2017-06-03 23 views

回答

2

設置在HTML中的輸入類型和範圍屬性

type="time" min="08:00:00" max="20:00:00" 

請注意,並非所有的瀏覽器尊重這些屬性。

參考:https://www.w3.org/wiki/HTML/Elements/input/time

對於剃刀

@Html.EditorFor(model => model.BookingEndTime, new { htmlAttributes = new { @class = "form-control", type = "time", min = "08:00:00", max = "20:00:00"} }) 
相關問題