jQuery UI Widgets Forums Editors DateTimeInput DateTimeInput – MVC model

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 7 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • DateTimeInput – MVC model #88626

    Manowar
    Participant

    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)

    DateTimeInput – MVC model #88705

    Hristo
    Participant

    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 Hristov

    jQWidgets team
    http://www.jqwidgets.com

    DateTimeInput – MVC model #88779

    Manowar
    Participant

    Hello, Hristo
    jqxdatetimeinput.js is referenced like this:
    <script type=”text/javascript” src=”~/Scripts/jqx-all.js”></script>
    and there are no errors

    DateTimeInput – MVC model #88986

    Hristo
    Participant

    Hello 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 Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.