You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When you set modelType with a custom format, the calculations start to include the local timezone. In my case, it set it as yyyy-MM-dd HH:mm. As a result, it makes time calculation wrong inside the input and time select when you set modelValue programmatically, but it also makes modelValue convertation wrong if you select time through the time picker.
I guess the issue is that you use the built-in date object that adds the local timezone when you call the parse method of the date-fns Link to the code line. It can be fixed using UTCDate from the @date-fns/utc package or in another way.
You can also try to select a time through the date picker to see that modelValue has a wrong value.
Please note that to reproduce this bug, you should have the system timezone set as a value that doesn't have a zero UTC offset
Expected behavior
The local timezone shouldn't affect the parsing results of the model value and input when the timezone is set.
Specific to reproduction: The time in the initial state should be 00:00 as the Asia/Tokyo timezone have a UTC+09:00 offset. Then, if you select the 23:00 value in the time picker, the model value should have a time value that is equal to 13:00.
The text was updated successfully, but these errors were encountered:
Describe the bug
When you set
modelType
with a custom format, the calculations start to include the local timezone. In my case, it set it asyyyy-MM-dd HH:mm
. As a result, it makes time calculation wrong inside the input and time select when you setmodelValue
programmatically, but it also makesmodelValue
convertation wrong if you select time through the time picker.I guess the issue is that you use the built-in date object that adds the local timezone when you call the parse method of the date-fns Link to the code line. It can be fixed using
UTCDate
from the@date-fns/utc
package or in another way.To Reproduce
modelValue
has a wrong value.Please note that to reproduce this bug, you should have the system timezone set as a value that doesn't have a zero UTC offset
Expected behavior
The local timezone shouldn't affect the parsing results of the model value and input when the timezone is set.
Specific to reproduction: The time in the initial state should be
00:00
as theAsia/Tokyo
timezone have aUTC+09:00
offset. Then, if you select the23:00
value in the time picker, the model value should have a time value that is equal to13:00
.The text was updated successfully, but these errors were encountered: