我在IOS浏览器(Safari或Chrome)上测试Web应用程序时遇到问题。
在Android和Windows上一切都很好但是在IOS上再次点击保存按钮时,datetimepicker弹出窗口并作为用户选择日期,但它已被选中。
<form id="frmSave" class="form-horizontal" method="post">
@Html.HiddenFor(model => @Model.Id) @Html.HiddenFor(model => @Model.RepLocation)
<div class="form-body">
@ViewBag.CanNotSaveLocation
<div class="form-group">
<label class="col-md-3 control-label"> Date and time </label>
<div class="col-md-4">
@if (Model.status != null) {
<div class="input-group ">
@Html.TextBoxFor(model => @Model.Date, new { @class = "form-control", placeholder = "Insert date ", @readonly = "readonly",
disabled = "disabled" })
</div>
} else {
<div class="input-group date form_datetime" data-date="">
@Html.TextBoxFor(model => @Model.Date, new { @class = "form-control", placeholder = "Insert date ", @readonly = "readonly",
id = "date_act" })
<span class="input-group-btn">
<button class="btn default date-set" type="button">
<i class="fa fa-calendar"></i>
</button>
</span>
</div>
}
</div>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-offset-3 col-md-9">
<div id="y"></div>
<input type="submit" id="submit" name="submit" class="btn blue" value="Save" />
<button type="button" onclick="cancel()" class="btn default">Cancel</button>
</div>
</div>
</div>
<!-- END FORM-->
</form>