我需要检索startdate
的值,以便可以将startdate
与开始时间结合起来并获取日期时间。如何检索@html.EditorFor
的数据或值?
我已经尝试使用jQuery来获取数据,但是我找不到将jQuery和@{}
内的值链接起来的方法。
@Html.EditorFor(model => model.StartDate, new { htmlAttributes = new {
@class = "form-control border-input", @type = "date", id = "modelId" }
})
@Html.ValidationMessageFor(model => model.StartDate, "", new { @class =
"text-danger" })
@Html.EditorFor(model => model.StartTime, new { htmlAttributes = new {
@class = "form-control border-input", @type = "time", id = "modelId2" } })
@Html.ValidationMessageFor(model => model.StartTime, "", new { @class =
"text-danger" })
我希望我可以将日期和时间结合在一起