input type=date时,时间数据回填,报错The specified value "2019-0404-18" does not conform to the required format...
<input autocomplete id="start-time" name="start_time" type="date"
class="glyphicon glyphicon-calendar col-sm-2 form-control" @if(!empty($orderInfo)) value="{{date('Y-m-d',strtotime($orderInfo->start_time))}}" @endif required="required" placeholder="合同开始时间">
<p></p>
<input autocomplete id="due-time" name="duetime" type="date"
class="glyphicon glyphicon-calendar col-sm-2 form-control" @if(!empty($orderInfo)) value="{{date('Y-m-d',strtotime($orderInfo->duetime))}}" @endif required="required" placeholder="合同结束时间">
<p style="color:#ff3b4c">到期时间不能早于开始时间</p>
The specified value "2019-0404-18" does not conform to the required format, "yyyy-MM-dd".
报错信息:指定值“2019-0404-18”不符合要求的格式“YYYY-MM-DD”。
更换为:将 ‘/’,换为 ‘-’
{{date('Y-m-d',strtotime($orderInfo->duetime))}}
赞赏码
非学,无以致疑;非问,无以广识