Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker freezes when using the setDates method #2689

Open
macomuzul opened this issue Aug 23, 2023 · 1 comment
Open

Datepicker freezes when using the setDates method #2689

macomuzul opened this issue Aug 23, 2023 · 1 comment

Comments

@macomuzul
Copy link

The problem I have is that when I use the setDates method and try to change month or year. It stays stuck and won't let me choose another month or year. I use it to sort the dates. The dates get sorted but my datepicker get's frozen.

Datepicker version used

1.9.0 and also tried with 1.10.0

Example code

I use this code to sort the dates in a multidate datepicker but when I want to change the month it won't let me. Let's say I am in August. Then I can't go to September or July and also I can't change years
datepicker.datepicker().on("show", e => {
let { dates } = e
if(dates.length > 0){
dates.sort((a, b) => a - b)
datepicker.datepicker("setDates", dates)
}
})

These are the options for my datepicker
{ weekStart: 1, language: "es", autoclose: false, maxViewMode: 2, minViewMode: 0, todayHighlight: true, multidate: true, multidateSeparator: ", ", format: "dd/mm/yyyy" }

@ryandmeyer
Copy link

Seeing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants