[英]Kendo UI timepicker: disabled time values
I'm new to using Kendo UI timepicker. 我是使用Kendo UI时间选择器的新手。 How do you disable specific values from the timepicker?
如何禁用时间选择器中的特定值?
PHP (fetch array for time slot) PHP(获取时隙的数组)
$time = $row['Time'];
HTML 的HTML
<input id="timepicker" value="10:00 AM" style="width: 100%;" />
JS JS
$(document).ready(function() {
// create TimePicker from input HTML element
$("#timepicker").kendoTimePicker();
});
You can explicitly set the values: 您可以显式设置值:
$("#timepicker").kendoTimePicker({
dates: [
new Date(2000, 10, 10, 10, 0, 0),
new Date(2000, 10, 10, 10, 30, 0)
] //the drop-down list will consist only two entries - "10:00 AM" and "10:30 AM"
});
or you can set min, max and interval. 或者您可以设置最小,最大和间隔。 Depends on what you need.
取决于您的需求。 http://docs.telerik.com/kendo-ui/api/javascript/ui/timepicker#configuration-dates
http://docs.telerik.com/kendo-ui/api/javascript/ui/timepicker#configuration-dates
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.