-2

I want to disable these months weekends 'May, June, July, August, Sept, Oct, November' via bootstrap3 datetimepicker.

Ammar
  • 79
  • 1
  • 1
  • 7
  • daysOfWeekDisabled: [0, 6] – Ravi Chauhan Dec 19 '18 at 09:42
  • Please take some time to read the help page, especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic), ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask), and more importantly, please read [the Stack Overflow question checklist](http://meta.stackexchange.com/q/156810/204922). You might also want to learn about [Minimal, Complete, and Verifiable Examples](http://stackoverflow.com/help/mcve). – Rory McCrossan Dec 19 '18 at 09:52

1 Answers1

0

You could use daysOfWeekDisabled setting described here

$(function () {
    $('#datetimepicker1').datetimepicker({
        inline: true,
        format: "dd MM yyyy",
        defaultDate: null,
        daysOfWeekDisabled: [0, 6]
    })
}).on('dp.change', function (e, selectedDate, $td) {
    //var time = e.date.format("HH:mm:ss");
    //alert(e.date + '  -  ' + time);
    $('.input-field1').val(e.date.format("DD/MM/YYYY"));
    if (check) {
        $('.FormDownDateSelect').slideToggle("fast", function () { });
    }
});
Ravi Chauhan
  • 1,409
  • 13
  • 26
  • daysOfWeekDisabled this method disables all the months weekends but I want to disable May, June, July, August, Sept, Oct, November weekends only – Ammar Dec 19 '18 at 09:46
  • @Ammar if you'd like more specific help, please edit your question to include your own attempt to solve this issue. Remember that SO is not here to write code for you, but to help you debug. – Rory McCrossan Dec 19 '18 at 09:47
  • @Rory McCrossan I am not able to make logic for that so that I posted this question but thanks for the comment – Ammar Dec 19 '18 at 09:51