datepicker icon indicating copy to clipboard operation
datepicker copied to clipboard

Strange behavior of the time picker (time duplication) when you select March 31 and then March 30

Open OrestMaryniuk opened this issue 10 months ago • 1 comments

Hi, while using this great library, I noticed a strange behavior of the time picker.

  1. pick March 31
  2. pick March 30
  3. We can see time duplication

Haven't noticed this with any other dates

Screencast from 29 03 24 14_37_47

OrestMaryniuk avatar Mar 29 '24 12:03 OrestMaryniuk

Hey @OrestMaryniuk thanks for submitting this. I'm a bit confused with this issue, but it turns out that this is a JS Date glitch. new Date(2024, 2, 31, 0, 179) will give you Sun Mar 31 2024 02:59:00 GMT+0200 new Date(2024, 2, 31, 0, 180) will give you Sun Mar 31 2024 04:00:00 GMT+0200 I will think about how to change the time logic to avoid this, and also I can't find any other date with this issue And it is specific to 2024.

UPDATED: it is related to daylight saving time so 3PM is not exist in your region and you can't pick it 🤷 .

Feshchenko avatar Aug 09 '24 14:08 Feshchenko