Skip to content

Instantly share code, notes, and snippets.

@abhianair
Created April 29, 2019 04:50
Show Gist options
  • Save abhianair/fe5c5ea312751d9a8b2f127e54357938 to your computer and use it in GitHub Desktop.
Save abhianair/fe5c5ea312751d9a8b2f127e54357938 to your computer and use it in GitHub Desktop.
Disable an array of dates from Datepicker
var array = ["2019-06-01","2019-06-02","2019-06-03"];
$('#inline-datepicker').datepicker({
// minDate: 0,
beforeShowDay: function(date) {
var string = jQuery.datepicker.formatDate('yy-mm-dd', date);
return [ array.indexOf(string) == -1 ]
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment