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

Add ability to set max/min date after control initialization #7

Open
sepavel opened this issue Jun 20, 2019 · 1 comment
Open

Add ability to set max/min date after control initialization #7

sepavel opened this issue Jun 20, 2019 · 1 comment

Comments

@sepavel
Copy link

sepavel commented Jun 20, 2019

Hello,

Can you add funcitons setMaxDate/setMinDate to change them after control initialization.

Regards,
Pavel

@AlexKrupko
Copy link
Owner

AlexKrupko commented Jun 12, 2021

Hi @sepavel ,

I've extended the minDate and maxDate options in the latest version 1.1.0. Now you can provide a callback function as a value for these options. The callback function should return the Date object or any valid string for Date constructor function. The returned date will be used as min or max value for the datepicker. Datepicker calls these callback functions each time on opening.

You can find an example in the /demo/index.html file.

Thanks,
Alex

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

No branches or pull requests

2 participants