Tony Tony - 5 months ago 68
Javascript Question

Jquery datepicker enable dates from array?

I am trying to enable just some specified dates in datepicker. In my case the values inside the variable "onlyThisDates".
Should I use enabledDates option to solve this or ..?
I do not want disable the values in the array. The other way around. I want disable everything and just enable the values in the array.

If someone could help it would be great.

<input id="openDatepick></input>

var onlyThisDates = ['09/11/2015', '10/11/2015', '11/11/2015'];

var nowDate = new Date();
var today = new Date(nowDate.getFullYear(), nowDate.getMonth(), nowDate.getDate(), 0, 0, 0, 0);

format: 'dd/mm/yyyy',
startDate: today

}).on('changeDate', function (e) {
$("#remove").on("click", function () {

Answer Source
@Tony Please Try This -- it will enable only specific dates in bootstrap 

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download