$(".datepicker").datetimepicker({ format: 'MM dd hh:ii P', startDate: "2016-08-19 10:00", daysOfWeekDisabled: [1,2,3,4,5], autoclose: true, }); How to disable specific date in datetime picker?
$(".datepicker").datetimepicker({ format: 'MM dd hh:ii P', startDate: "2016-08-19 10:00", daysOfWeekDisabled: [1,2,3,4,5], autoclose: true, }); How to disable specific date in datetime picker?
That will depend on which plugin you are using, there are several bootstrap-datetimepicker projects.
If bootstrap-datetimepicker-master is this one, based on this fork you can use datesDisabled:
datesDisabled
String, Array. Default: []
Array of date strings or a single date string formatted in the given date format
You can check it out here.
If you are using other plugin you need to have a look to its docs, but I guees more of the projects have datesDisabled available.
Remember to specify the dates in the format that you have set, in your case: 'YYYY/MM/DD'.
$(".datepicker").datetimepicker({ format: 'YYYY/MM/DD hh:ii', startDate: '2016/08/19 10:00', daysOfWeekDisabled: [1,2,3,4,5], datesDisabled: ['2016/08/20'], autoclose: true, }); format: 'YYYY/MM/DD' you need to pass datesDisabled: ['2016/08/21'] and not datesDisabled: ['2016-08-21']