我查看网页代码:如何在查看页面呈现后保留0值?
Html.LabelFor(x => x.StartTime, new {@class = ""}), Html.TextBoxFor(x => x.StartTime, new
{
@class = "startTime form-time", @Value = Model.StartTime.HasValue
? new DateTime(Model.StartTime.Value.Ticks).ToString("h:mm tt")
: string.Empty
})
我在TimePicker在开始时间字段使用jQuery slected 08:00 AM。但是在从下拉字段中选择一个值(进入服务器端)之后,在查看页面呈现后,时间选择器字段值更改为8:00 AM。也就是说,它删除了值。但我希望价值如同08:00 AM。
按预期正常工作。谢谢。 –