在jQuery datetimepicker中禁用特定时间
16lz
2021-01-22
Is there any way to disable day and time in jQuery datetimepicker? I want to disable a particular time on a particular day(Not the whole day).
有没有办法在jQuery datetimepicker中禁用日期和时间?我想禁用某一天的特定时间(不是一整天)。
1 个解决方案
#1
0
Harpreet:
There is an option to enable or disable specific times, called allowTimes:
可以选择启用或禁用特定时间,称为allowTimes:
Example:
jQuery('#datetimepicker5').datetimepicker({
datepicker:false,
allowTimes:[
'12:00', '13:00', '15:00',
'17:00', '17:05', '17:20', '19:00', '20:00'
]
});
Reference: http://xdsoft.net/jqplugins/datetimepicker/#allowTimes
Hope this helps!
希望这可以帮助!
更多相关文章
- 根据用户时区显示当地时间 php+javascript
- JavaScript动态显示时间
- Day.js :一个轻量的处理时间和日期的 JavaScript 库
- 【第三篇】说说javascript处理时间戳
- 具有iOS Swift请求时间输出的Express.js服务器
- 如何获得mp3文件的大小和持续时间?
- 获取当前时间getDate()注意点
- 返回指定时间段相同间隔数组
- 等待执行所有ajax回调的最佳解决方案