Eonasdan / tempus-dominus

A powerful Date/time picker widget.
https://getdatepicker.com
MIT License
7.16k stars 4.41k forks source link

maxDate not selectable #2879

Closed SzoftverHaz closed 6 months ago

SzoftverHaz commented 7 months ago

Prerequisites

Describe the issue

When I set maxDate like this: 'updateOptions({ restrictions: { maxDate: new Date('2024-11-20'), }, });' in calendar 20th looks like active but nothing happens when click on it, so it is not selectable

StackBlitz fork

https://stackblitz.com/edit/tempus-dominus-v6-repl-jtub1v?file=example.js

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome, Firefox, Microsoft Edge

What version of are you using? You can find this information from the sample StackBlitz.

6.7.19

What your browser's locale? You can find this information from the sample StackBlitz.

hu-HU

SzoftverHaz commented 7 months ago

There is another bug. I added a second TD instance to this example that is not allow to select November. Maybe related to previous bug.

SzoftverHaz commented 7 months ago

I found another one and included this snippet as a third input. When <(previous decade) pressed, 2012 and 2013 can be selected only.

Eonasdan commented 6 months ago

The other issues you mentioned should be fixed in 6.9.4. The min/max date are time stamps. They are exclusive, so you will need to either set the time to midnight or pad the day by 1.

SzoftverHaz commented 6 months ago

Thank you!