CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Update datetime control to use calendar UI #71509
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
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
We're at least using a This matches the design specs, but I've noticed that interacting with the Screen.Recording.2025-09-04.at.17.47.26.mov |
It's a tricky one. The native browser calendar UI includes some tools which may (or may not) be useful like clearing the value, and a shortcut to select 'today'. It's also arguably more ergonomic on mobile. But on balance I think your suggestion sounds reasonable. Curious what @mirka thinks. @jorgefilipecosta A couple of small feedbacks:
|
We don't have a way to do this, both the panel and regular layout use the same underlying component declared by the field type ( |
I suppose it doesn't matter, so long as a consumer can set up a date field in a |
What I am hearing is that we need two controls, and we'd use one or another depending on the situation. We could have a:
Any of them can be the default for the How does this sound? |
If I recall correctly, we were mainly forced to build the custom calendar to show more intuitive visuals for date ranges. A custom calendar isn't really necessary (nor particularly "better") for a single datetime value, IMO. So I'd also think just an I actually wouldn't recommend the custom calendar + |
Reserving the calendar for ranges seems absolutely fine to me :) |
f354bca
to
9f22e6d
Compare
Pushed changes to use the datetime-local: Screen.Recording.2025-09-12.at.09.47.30.movScreen.Recording.2025-09-12.at.09.37.31.mov |
This seems fine as a starting point. I compared with the current date selection UX for posts/pages on trunk and I have to say there's something about the big calendar UI in the @mirka how would you feel about a control that is basically a combination of calendar + |
Thank you for pushing these enhancements @oandregal. |
Sounds good. Maybe this should just be the standard pattern for when using the custom calendar components. Pair with a |
9f22e6d
to
8bdfe17
Compare
Size Change: +405 B (+0.02%) Total Size: 1.94 MB
โน๏ธ View Unchanged
|
Flaky tests detected in 8bdfe17. ๐ Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17736657466
|
Summary
Updates the datetime control in DataViews to use a modern calendar-based UI, replacing the previous TimePicker implementation with a more intuitive interface.
Changes
Technical Details
Screenshots
Test Plan