Bootstrap 3 Datepicker first day of the month

0

I am using the bootstrap3 DataPicker, but I have not been able to set it to start on the 1st of the current month, I have tried many forms, here below one of them. Has anyone done it?

$(function() {
   $("#date_id").datepicker({ firstDay: 1 });
});
    
asked by Archer_A 23.10.2017 в 21:50
source

1 answer

0

Try using the event beforeShowDay .

I'll give you the example and the demo, I hope it works!

$(".datepicker").datepicker({
beforeShowDay: function(date) {
    return [true, date.getDate() == 1 ? "first-class" : ""];
}

});

The DEMO

    
answered by 23.10.2017 в 22:24