Skip to content

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

Closed
@petarstoyanov-ekko

Description

@petarstoyanov-ekko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions