Open Aakash007-ai opened 2 weeks ago
Hello @Aakash007-ai
I had the same problem. Fixed by wrapping the date that you are getting from the picker in the dayjs
constructor and then using toDate
method like this:
<DateTimePicker
mode="single"
date={date}
onChange={(params) => console.log(dayjs(params.date).toDate())}
/>
Don't forget to import dayjs like this: import dayjs from 'dayjs'
Hope it helps!
@Aakash007-ai Could you also provide the screenshot of broken strip? It would be very helpful.
Hi there, I'm having the exact same problema but, at least, until now with only two specific dates: 10/11/1998 and 10/25/1992
Seens to be related to this issue #75
After digging into the lib implementation, this problem seens to be retaled to the dayjs lib
Hi you can check this bug by running example too. It is some kind of weired , if you select any date it got selected correct but in state value , it is one day before and if you try to convert that state to string date format. (to Mon , 2 ,2024, february), it gives you correct selected data but it will be 01-02-2024T so it gives correct date when you select , but actual state value we got is one day before, it is apllicable for range too , please correct this.
also if we call that DatePicker with preselectd date range it gives a broken range's color in between the strip