Vincy Joseph Vincy Joseph - 3 years ago 222
jQuery Question

jQuery Datepicker minDate is not working in bootstrap

I'm trying to set a minDate for a jquery datepicker. but itz is not working.

$('.datepicker').datepicker({
autoclose: true,
todayHighlight: true,
format: "dd-mm-yyyy",
minDate: new Date(),
clearBtn: true,
multidate: false,
multidateSeparator: ",",
toggleActive: true
});

Answer Source

For jquery datepicker use:

$(".datepicker").datepicker({
    minDate: 0
});

For Bootstrap versions use:

$(".datepicker").datepicker({
     startDate: new Date()
});
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download