Angularjs验证时间显示无效
我的标记中有下一个angularjs输入时间标记 我试图在表单中进行验证 当我的视图中有下一个值时,我的表单无效:Angularjs验证时间显示无效,angularjs,Angularjs,我的标记中有下一个angularjs输入时间标记 我试图在表单中进行验证 当我的视图中有下一个值时,我的表单无效: frmAg.input.$error = {"max":true} Model value to AG_HOR_ATEND_INICIAL="2017-11-03T10:00:00.000Z" View value to AG_HOR_ATEND_INICIAL="08:00" 我想知道,如果我的时间输入在最大和最小时间范围内,为什么我的输入有无效的最大值 //加价 <
frmAg.input.$error = {"max":true}
Model value to AG_HOR_ATEND_INICIAL="2017-11-03T10:00:00.000Z"
View value to AG_HOR_ATEND_INICIAL="08:00"
我想知道,如果我的时间输入在最大和最小时间范围内,为什么我的输入有无效的最大值
//加价
<form name="frmAg" class="form-horizontal" novalidate>
<input name="input" id="horarioInicioAtendimento" type="time"
min="05:00:00" max="23:59:00"
ng-model="AG_HOR_ATEND_INICIAL" placeholder="HH:mm" class="form-control" required>
</form>
试试这个
//this how you assign the value
$scope.AG_HOR_ATEND_INICIAL = new Date(1970, 0, 1, 08, 00, 0);
阅读此链接了解更多信息:@LuizAlves