jQuery UI Widgets › Forums › Editors › DateTimeInput › DateTimeInput – MVC model
Tagged: Angular datetimeinput, bootstrap datetimeinput, javascript datetimeinput, jquery datetimeinput, jqwidgets datetimeinput, jqxdatetimeinput, typescript datetimeinput
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 7 years, 10 months ago.
-
Author
-
Hi, I’ve got this code:
<script> $("#DocDate").jqxDateTimeInput({formatString: 'dd.MM.yyyy', culture: 'ru-RU'}); $("#RegistrationDate").jqxDateTimeInput({formatString: 'dd.MM.yyyy', culture: 'ru-RU'}); </script> <div style="width: 920px; margin: 0 auto"> @using (Html.BeginForm(@*"Update", "fooDocument", FormMethod.Post*@)) { @Html.AntiForgeryToken() <div class="form-horizontal"> <h4></h4> <hr /> @Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.HiddenFor(model => model.DocumentID) <div class="form-group"> <label class="control-label col-md-2">DocDate</label> <div class="col-md-4"> <div id="DocDate" class="form-control" name="DocDate"></div> </div> @Html.LabelFor(model => model.RegNumber, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-4"> @Html.EditorFor(model => model.RegNumber, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.RegNumber, "", new { @class = "text-danger" }) </div> </div> <div class="form-group"> <label class="control-label col-md-2">RegistrationDate</label> <div class="col-md-4"> <div id="RegistrationDate" class="form-control" name="RegistrationDate"></div> </div> @Html.LabelFor(model => model.Number, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-4"> @Html.EditorFor(model => model.Number, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.Number, "", new { @class = "text-danger" }) </div> </div>
What should I do to bind this widjet to MVC model? – now it doesn’t show the date from database in form, but shows date(now)
(I saw demos – didn’t help)
Hello Manowar,
Could you try to check is there and is it the correct reference for jqxdatetimeinput.js?
Also, I would like to ask you is there any error message?Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHello, Hristo
jqxdatetimeinput.js is referenced like this:
<script type=”text/javascript” src=”~/Scripts/jqx-all.js”></script>
and there are no errorsHello Manowar,
Thank you for the interest.
But I only could suggest you “Registration Form” demo from our ASP .NET MVC section.
Thank you for your understanding.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.