Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3800

Editor datepicker disable dates and ranges

$
0
0

Hi,

Is it possible to disable individual dates or date ranges in the jQuery datepicker in Editor? Something like:

var disabledDate = ["22-05-2018","26-05-2018"...];

opts:  {
    minDate: new Date(),
    beforeShowDay: function(date) {
        var string = jQuery.datepicker.formatDate('dd-mm-yyyy', date);
        return [ disabledDates.indexOf(string) == -1 ]
    }
}

Cheers

MJ


Viewing all articles
Browse latest Browse all 3800

Trending Articles