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

The Clear method doesn't clear the selected range #654

Open
sulym-roman opened this issue Jan 13, 2025 · 1 comment
Open

The Clear method doesn't clear the selected range #654

sulym-roman opened this issue Jan 13, 2025 · 1 comment

Comments

@sulym-roman
Copy link

Hello!

When the range option is true and I call the clear method, it removes only the first and the last dates, but all dates inside the range still hold the "-in-range-" class and stay visually selected (see the attached screenshot).

The version used – 3.5.3

image-01-13-2025_09_56_AM

@sulym-roman
Copy link
Author

Those who need a quick fix can use this code:

$('.air-datepicker-cell.-in-range-').each(function(){
	if (!$(this).prevAll('.-range-from-').length)
		$(this).removeClass('-in-range-');
});

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

1 participant