Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: date range widget #954

Closed

Conversation

omargawdat
Copy link
Contributor

@omargawdat omargawdat commented Jan 9, 2025

Feature:

I've implemented support for the PostgreSQL DateTimeRangeField. I kept the implementation straightforward to maintain consistency with the project's existing patterns. Please review and share any feedback you may have.

Before

image

After

image

@omargawdat omargawdat closed this Jan 9, 2025
@omargawdat omargawdat deleted the feat/date-range-widget branch January 9, 2025 20:54
@omargawdat omargawdat restored the feat/date-range-widget branch January 9, 2025 20:54
@omargawdat omargawdat reopened this Jan 9, 2025
@lukasvinclav lukasvinclav changed the title Feat/date range widget feat: date range widget Jan 22, 2025
@lukasvinclav
Copy link
Contributor

Checked the functionality and it might work for you but we have to choose a different approach. We must use something like UnfoldAdminSplitDateTimeWidget (maybe UnfoldAdminSplitDateTimeRangeWidget) but instead of two widgets, four separate widgets will be required: date from, time from, date to, and time to. The reason is that we want to display Django admin widgets and browser's native inputs.

I will close the PR now. Not, because it is wrong but because new approach is required. Feel free to create a new PR with logic which I pointed above and I will take a look and I can finish the details (responsive).

@omargawdat
Copy link
Contributor Author

yeah sure will do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants