md-date-time-picker
md-date-time-picker copied to clipboard
Disable specific time in time picker
There needs to be a feature to disable a specific time in the time picker dialog (Like the one in the date picker dialog where one can choose a starting date and all the dates before that chosen date are disabled).
Hi sohailrajdev97, Could you please provide an example of how to disable specific days? I still can't figure it out :(
@lloydbanks. See the past
argument in official docs.
https://puranjayjain.github.io/md-date-time-picker/#documentation/init
For an example, see line number 95 in this file : https://github.com/ID-BPHC/Instruction-Division-2.0/blob/master/views/room-booking/step1.jade
@sohailrajdev97 thanks for your reply and example, I know about past
and future
args and as I understand they allow only to subtract a whole period, e.g 7 days
.
What I mean is to disable specific single days, e.g: June 6 and June 11 should be not active.
Hi, @sohailrajdev97 @lloydbanks there is no such provision in the current project to disable single days, however, you can do so by tinkering with the code.
I would suggest you add a class to each cell you want to disable, look here https://github.com/puranjayjain/md-date-time-picker/blob/master/src/js/mdDateTimePicker.js#L560 and add CSS attribute pointer-events: none;
property