Updating
I made a pull request to add this option to the plugin, the authors validated and added the version that is already available on the date
04/05/2016.
Add option to enable specifi days #98
As the above mentioned, there is no such behavior, but you can easily customize and add your behaviors to any plugin, just understand how it works.
Example:
Pass the days that remained enabled by parameter.
$('#date').bootstrapMaterialDatePicker({
time: false,
clearButton: true,
enableDays: [3, 5]
});
Starting with index 0 [3,5] are equivalent to Fourth and Sixth.
Now open the file: bootstrap-material-datetimepicker.js
Add the following behavior:
enableDays: function() {
var enableDays = this.params.enableDays;
if (enableDays) {
$(".dtp-picker-days tbody tr td").each(function() {
if (!(($.inArray($(this).index(), enableDays)) >= 0)) {
$(this).find('a').css({
"background": "#e3e3e3",
"cursor": "no-drop",
"opacity": "0.5"
}).off("click");
}
});
}
}
Thus remaining:
Now you need to trigger this behavior when the modal opens,in this example I added at the end of onFocus
:
The result looks like this:
Hi Gabriel, thanks for the help, but now I noticed that by clicking once it really appears with the days of the week blocked but if I go forward in the calendar they unlock all being possible to select the days, you know what? thanks again
– Laranja Mecânica
@Orangemechanical I know yes, remember that I installed it in the event on Focus? Now you just need to declare it in the transition event
– Gabriel Rodrigues
Thanks again, perfect :D
– Laranja Mecânica