ler ler - 7 months ago 21
Javascript Question

Bootstrap Date Picker - enable just all monday of every month

I want to enable all monday of every month and disable past days. this is the code i'm using :

$(document).ready(function() {
$('.datepicker').datepicker({
autoclose: true,
startDate: new Date()
});
});


and this is jsfiddle. this website has exactly what i want example

Answer

Just use daysOfWeekDisabled. 0-6 = Days of week

 $(document).ready(function() {
    $('.datepicker').datepicker({
        autoclose: true,
        startDate: new Date(),
        daysOfWeekDisabled: "0,2,3,4,5,6"
    });
});

Updated fiddle

Comments