我想禁用时间选择器 [英] I want to disable Time in time picker
问题描述
我的表格中有一个字段是时间。这是jQuery时间选择器。我可以每半小时看一次时间,我给出了具体的时间,从早上7点到晚上7点。我已经花了这样的时间,因为它将用于预约,在特定的时间段只有3个客户可以预约。而且,我也想要禁用时间,在今天和前几天也已经过去了。我不想用数据库来做。
< script >
$(function(){
jQuery('#onselectExample')。timepicker({
'minTime':'7:00 am',
'maxTime':'晚上7点',
//格式:'H:我'
});
});
< / script >
< div class = row >
< div class = 大4列左 style = text-align:right; >
@ Html.Label(时间)
< / div < span class = code-keyword>>
< div class = 大7列留下 >
< 输入 id = onselectExample type = text class = time 名称 = onselectExample 必需/ >
< / div >
< / div >
< blockquote>(function(){
jQuery('#onselectExample')。timepicker({
'minTime':'7:00 am',
'maxTime':'7 :00pm',
//格式:'H:我'
});
});
< / script >
< div class = row >
< div class = 大4列左 style = text-align:right; >
@ Html.Label(时间)
< / div < span class = code-keyword>>
< div class = 大7列留下 >
< 输入 id = onselectExample type = text class = time 名称 = onselectExample 必需/ >
< / div >
< / div >
I am having a field in my form which is "Time". It is jQuery time picker. I can see the time every half hourly,i have given specific time i.e; from morning 7-am to evening 7-pm.I have taken the time like this as it will be used for giving appointments and in a particular time-slot only 3 customers can get appointment.And,i also want to disable the time,which has gone in the present day and the previous days as well.I don't want to do it with Database.
<script>
$(function () {
jQuery('#onselectExample').timepicker({
'minTime': '7:00am',
'maxTime': '7:00pm',
//format: 'H:i'
});
});
</script>
<div class="row">
<div class="large-4 columns left" style="text-align:right;">
@Html.Label("Time")
</div>
<div class="large-7 columns left">
<input id="onselectExample" type="text" class="time" name="onselectExample" required/>
</div>
</div>
(function () { jQuery('#onselectExample').timepicker({ 'minTime': '7:00am', 'maxTime': '7:00pm', //format: 'H:i' }); }); </script> <div class="row"> <div class="large-4 columns left" style="text-align:right;"> @Html.Label("Time") </div> <div class="large-7 columns left"> <input id="onselectExample" type="text" class="time" name="onselectExample" required/> </div> </div>
这篇关于我想禁用时间选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!