bootstrap-timepicker
bootstrap-timepicker copied to clipboard
How to disable a time or time range?
Hello, I am using the this timepicker with bootstrap but i didn't find the way to disable any time or time range. Can you please explain how we can disable a time?
What do you mean "disable a time"? you can use the disabled
attribute on input
elements to disable the input element.
@konstantinfo Let me know if you solved this or you still need help.
@konstantinfo is this still an issue?
As bootstrap datepicker plugin has startDate / endDate this plugin should have too.
Idea is to have option to enable specific time range to be entered and rest to disable.
bootstrap datepicker is a separate project. Can you not achieve this by listening for changeTime
events and performing whatever business logic you need?
@mrhota - yep I can but idea is to have it easily achievable by config. This as config is requested by lot of users - I'm sure in that.
On the other hand is going to help users with basic knowledge of JS.
Currently I'm doing as you suggested.
I think the idea is ok, but I'm not sure what the best interface for it is. I'm not really in love with the maxHours
option we already have. I don't like adding more and more config options as people come up with new ideas. I think consolidating related options into a single-valued option and possibly accepting an object for those options would cut down on clutter. I don't know yet.
The timepicker currently only deals with one type of time (http://stackoverflow.com/questions/2532729/daylight-saving-time-and-time-zone-best-practices/3269325#3269325), but people use the timepicker for entering several different types of time. I'm not yet sure how to proceed so that the timepicker can be used correctly for each type of time.
Maybe config params like: startTime, endTime ?
@vukasin0: I agree that this would be really helpful!
@konstantinfo mentioned problem occurred to me. (i want to disable time range - 08:00 AM to 10:00 AM) .
Is this implemented yet? =/
@Braintelligence maybe not