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

Selecting only a given date outside DST causes the time (hours) to shift unexpectedly. #991

Closed
petarstoyanov-ekko opened this issue Sep 17, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@petarstoyanov-ekko
Copy link

Describe the bug
Selecting only a given date causes the time (hours) to shift unexpectedly.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to https://stackblitz.com/edit/vuepic-vue-datepicker?file=src%2Fcomponents%2FPlayground.vue
  2. Select e.g. 1 February 2024 10:00 am
  3. Start changing the day to 11th, then 12, then 13.
  4. Each time the day is changed, the time presented (hours) moves an hour ahead

Observations
This seems to be related to DST changes, local timezone is in DST now and selected date is outside DST. This issue does not reproduce when selecting another date in DST.

Expected behaviour
When the user is interacting with the date only as in this example, the selected hours should not be affected.

In the edge case of starting with hours as 23, selecting e.g. 16th overflows into actually selecting 17th (this interaction changes both the date and the hours)

Screenshots
image

Desktop & mobile (please complete the following information):

  • Browser Chrome - Version 128.0.6613.138 (Official Build) (64-bit)
  • Library version 9.0.3
  • Local timezone - Europe/Athens
@petarstoyanov-ekko petarstoyanov-ekko added awaiting triage The issue is not reviewed by the maintainers bug Something isn't working labels Sep 17, 2024
@alexgil1994
Copy link

Having a similar behavior when combined with :timezone=" { timezone: "UTC" } as TimeZoneConfig;, whenever the user changes anything in the vue-date-picker instance as a datetime picker (change of day, minutes, hours) then the hours are also increasing by +1.

@Jasenkoo Jasenkoo removed the awaiting triage The issue is not reviewed by the maintainers label Oct 9, 2024
@cah-charbel-fakhry
Copy link

cah-charbel-fakhry commented Oct 30, 2024

Any update on this? As I am facing the same issue but the time moves 1 hour back.
Replicated here:
https://stackblitz.com/edit/vuepic-vue-datepicker-w5z3hq?file=src%2Fcomponents%2FPlayground.vue
The local timezone is in DST the timezone "Asia/Tokyo" is not in DST.
As @petarstoyanov-ekko mentioned It is happening whenever we choose a date outside the DST.

@cah-iman-matar
Copy link

cah-iman-matar commented Oct 30, 2024

This bug is 1month old.
Did anybody find a workaround?

@cah-charbel-fakhry
Copy link

cah-charbel-fakhry commented Nov 4, 2024

@Jasenkoo Will this be released soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants