【发布时间】:2018-08-28 09:48:04
【问题描述】:
有没有办法知道用户在datetime-local 类型的<input> 中输入了无效的日期和/或时间,而不是他没有输入任何内容?
我想将无输入视为用户想要重置/删除正在编辑的日期时间。
我正在使用来自 AngularJS 的 input['datetime-local'] – https://docs.angularjs.org/api/ng/input/input%5Bdatetime-local%5D。
【问题讨论】:
-
那个问题的答案是不充分的。单独的“badInput”并不能为您提供您所追求的三种状态。
标签: angularjs html input datetimepicker html-input