logbon72 / angular-material-datetimepicker

Datepicker for Angular Material, mimick's Android's date time picker
https://logbon72.github.io/angular-material-datetimepicker
MIT License
169 stars 123 forks source link

disable weekends from the calendar #105

Open sachilaRanawaka opened 7 years ago

sachilaRanawaka commented 7 years ago

how can I disable certain days in the calendar? As an example, i want to disable all the weekends. here is my code

<input time="false" date="true" mdc-datetime-picker type="text" id="date" placeholder="Date" ng-model="date" min-date="minDate" max-date="maxDate" disable-dates="dates">

hexadecy commented 7 years ago

Current implementation is for specific date object in an array:

 $scope.dates = [new Date('2016-11-14T00:00:00'), new Date('2016-11-15T00:00:00'),
        new Date('2016-11-30T00:00:00'), new Date('2016-12-12T00:00:00'), new Date('2016-12-13T00:00:00'),
        new Date('2016-12-31T00:00:00')];
hexadecy commented 7 years ago

Now you can with this release: https://github.com/beenote/angular-material-datetimepicker/releases/tag/v1.7.2