Closed ApekshaKatariya closed 4 years ago
That's a setting specific to Datepicker- the Datepair library doesn't interact with disabled days in any way. Try the Datepicker documentation for more info https://github.com/uxsolutions/bootstrap-datepicker
i m just write this code to disable selected dates but not working
var array = ["17-03-2020", "25-03-2020", "28-03-2020"] / create an array of days which need to be disabled / $('#basicExample .date').datepicker({ format: 'd-mm-yyyy', autoclose: true, startDate: '-0m', endDate: '+1m',
beforeShowDay: function (date) { var string = jQuery.datepicker.formatDate('d-mm-yy', date); return [array.indexOf(string) == -1] } }); var basicExampleEl = document.getElementById('basicExample'); var datepair = new Datepair(basicExampleEl);