DatePickerX icon indicating copy to clipboard operation
DatePickerX copied to clipboard

Add ability to set max/min date after control initialization

Open sepavel opened this issue 6 years ago • 1 comments

Hello,

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

Regards, Pavel

sepavel avatar Jun 20 '19 11:06 sepavel

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

AlexKrupko avatar Jun 12 '21 20:06 AlexKrupko