[英]min Attribute for date input type not accepting variable value in javascript
[英]input type date and min value set by javascript
我正在使用Chrome(版本31.0.1650.63 m),并且当我通过javascript在input type date
上设置了最小日期时,HTML中的min属性被更改,但datepicker不使用它。
我想念什么?
<input type="date" id="input" />
//...
document.getElementById('input').setAttribute("min", '2013-12-9');
根据w3c( http://dev.w3.org/html5/markup/input.date.html ),您只需要在一天中领先零:
代替2013-12-9
必须是2013-12-09
http://jsfiddle.net/edgarinvillegas/5UbPs/9/
有用 :)
来自玻利维亚拉巴斯的欢呼声
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.