t1m0n / air-datepicker

Lightweight, dependency-free JavaScript datepicker.
https://air-datepicker.com
MIT License
2.58k stars 1.36k forks source link

selectedDates not working ONLY for a SPECIFIC month 😱 #619

Open Ale-Digitale opened 1 week ago

Ale-Digitale commented 1 week ago

Hi there,

I'm using latest version v3.5.3

today is: 2024-06-28 ( 28 June 2024 )

selectedDates DOESN'T WORK for PAST dates and FUTURE dates for the month of JUNE !

Let me gives you examples:

1) any date in the PAST works PERFECTLY ( EXCEPT June ) selectedDates: ['2023-05-01'] .... works selectedDates: ['2021-12-29'] .... works selectedDates: ['2019-10-15'] .... works selectedDates: ['2022-06-04'] .... FAILS, it's JUNE !

2) any date in the FUTURE works PERFECTLY ( EXCEPT June ) selectedDates: ['2025-05-01'] .... works selectedDates: ['2027-12-29'] .... works selectedDates: ['2029-10-15'] .... works selectedDates: ['2031-06-04'] .... FAILS, it's JUNE !

3) any date in the CURRENT YEAR works PERFECTLY ( INCLUDING June ) selectedDates: ['2024-05-01'] .... works selectedDates: ['2024-12-29'] .... works selectedDates: ['2024-10-15'] .... works selectedDates: ['2024-06-04'] .... works

I don't have any strange setting in my AirDatepicker, no maxDate, no minDate, nothing !

When I say it doesn't work, I mean: the DATE doesn't get SELECTED, the calendar view is set to the current year and month, with no day being selected.

Now, I don't know if this is specifically for JUNE.... or it's affecting the current month, therefore, next month this will happen to JULY and so on...

Please, check ( and fix ) it, thank you !

Alex