-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Calendar: UTC/time zone support #4128
Comments
Similar to: #4076 |
Yeah, absolutely; sorry, I looked for "timezone" and didn't find anything related. In fact, your comment on the linked issue is quite on point... I'm rather certain now that this was a logical mistake on my side. Thanks for your help, and apologies for the noise! |
OK I am going to close that other ticket too. |
Wait, my bad... Damn, dates are tricky. An easy way to see the problem is: the initial time used by the calendar corresponds to the local time of the machine that opens it. More generally, the representation of the value both in the selection elements and in the input box is as local time. The representation in the input box is in fact configurable by the prop |
Can you check this: #3381 I thought it allowed you to set both... |
The time picker does not take this into account, see for instance https://github.com/primefaces/primereact/blob/master/components/lib/calendar/Calendar.js#L2926, where
|
OK there are 11 spots in the code using |
Note that there currently isn't a "time zone" setting in the "locale". Which I think makes sense, since there are many "locales" with more than one time zone. It probably should be a separate setting. |
probably needs a |
Any progress on this front? It's a rather fundamental feature for a date picker, I would say. |
I was looking it has not been implemented in PrimeVue yet either. Maybe we have to be pioneers and be the first of the libs to implement this. |
Describe the feature you would like to see added
Right now, dates typed in a calendar's input box seem to be interpreted as local times. However, this is not always what's desirable. In my case, I would like to be able to type a UTC date and have it be interpreted as a UTC date, rather than local time.
The text was updated successfully, but these errors were encountered: