-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add "Today" to the Date Picker #6881
Comments
React Date Picker, which is used by Gutenberg, does allow a "Today" button by default, but that button takes you to the current date of your browser, I suppose, not your WordPress timezone. |
That could work. I don't see that really being an issue. |
Not like that, but let's imagine it this way: My website is running on London time and it's Saturday night there, while it's Sunday in India. When I click on Today, it takes me to the current date which is Sunday in time, even tho it's Saturday for the website, so WordPress takes it as a future time, in my case. |
I also see a utcOffset parameter, which should fix this issue. |
The scenario you laid out is exactly the same as mine, but with different countries. Again, I would expect when I click Today, that it snaps to the Today of the timezone I'm currently in, not based on the WordPress setting. |
No, that’s not what you want. If I do that in India right now, my post will be “Scheduled” instead of being Published. It’s hard to understand in text and I only understood when I tried that with code. :) |
Yup, adding a timezone offset worked. Let me send a PR. :) |
@bahia0019 Maybe you can also test on your side to make sure I didn't miss anything. :) |
Yeah, for sure. if I can figure it out. Kinda new to Git. |
Clone my fork of the repo. Run |
I do need some coffee, but that's because I've got to figure out how to setup a Multisite on Google Cloud right now! :D Thanks for contributing to this! |
There's talk of using a new date picker component in #7621 (see: #7621 (comment)). I think it's likely that this will be addressed when #1311 is addressed. |
As we have the new date component lets close this one and focus there. |
Is your feature request related to a problem? Please describe.
Being able to bounce back to Today in the date picker should be performed by a simple button press rather than walking back through months/years.
Describe the solution you'd like
Add a "Today" button in the Date Picker UI
I'm attaching a few random Date Picker's on a Google image search.
The third one is Joomla's
The text was updated successfully, but these errors were encountered: