[英]How can I disable only selected dates on html5 datepicker?
How can I disable few dates (Ex: one week) on a HTML datepicker? 如何禁用HTML日期选择器上的几个日期(例如:一周)? I have an input item like this
我有这样的输入项
<input type="date" id="date01" name="date01" max="2019-12-30">
I know I can use min and max values to limit available time period, but in here, I want to block out some days in the middle. 我知道我可以使用最小值和最大值来限制可用时间段,但是在这里,我想在中间屏蔽几天。 can I do that with plain html date picker?
我可以用纯HTML日期选择器吗? if so, how?
如果是这样,怎么办?
You can't: the HTML5 date
input only accepts a lower and upper bound to indicate the allowed date range: you cannot specifically select certain dates that are disabled/non-selectable to the user. 您不能:HTML5的
date
输入只接受一个上限和下限,表示允许的日期范围:您不能明确选择特定日期已禁用/不可选择给用户。
There are two solutions to your approach: 您的方法有两种解决方案:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.