Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable specific time in time picker #230

Open
sohailrajdev97 opened this issue Dec 21, 2017 · 5 comments
Open

Disable specific time in time picker #230

sohailrajdev97 opened this issue Dec 21, 2017 · 5 comments

Comments

@sohailrajdev97
Copy link

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).

@lloydbanks
Copy link

lloydbanks commented Jun 28, 2018

Hi sohailrajdev97,
Could you please provide an example of how to disable specific days? I still can't figure it out :(

@sohailrajdev97
Copy link
Author

@lloydbanks. See the past argument in official docs.

https://puranjayjain.github.io/md-date-time-picker/#documentation/init

@sohailrajdev97
Copy link
Author

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

@lloydbanks
Copy link

lloydbanks commented Jun 28, 2018

@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.

@puranjayjain
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants