If I prepopulate my HTML control as follows:
@Html.TextBox(string.Empty, Model.Value.ToString("h:mm tt"), new { @class = "form-control timecontrol", @type = "time" })
and then initialize my igDateEditor as follows:
$('.timecontrol').igDateEditor({ dateInputFormat: "h:mm tt", dateDisplayFormat: "h:mm tt", width: "100%", allowNullValue: true, buttonType: "spin" });
When I select the control to edit the value the editor goes blank and I lose the value set via my @Html.TextBox call.
If I change my MVC text box call to the following it works but obviously flashes the full date value for a second first:
@Html.TextBox(string.Empty, Model.Value.ToString(), new { @class = "form-control timecontrol", @type = "time" })
Hello,
Could you please send me your sample as attached file, so I can investigated it and provide you a better support.
Regards,
Marina Stoyanova
Software Developer,
Infragistics, Inc.
I'm not missing a jQuery reference. It's handled in bundling and rendered in my _Layout.cshtml file
Hello Dr Tone,
The reason you notice a different behavior in the editors is that from 15.2 version of out ignite ui controls, the editors are brand new, based on different architecture. In our online documentation you can find more information about that change as well as migration topics for all of the editors:
http://www.igniteui.com/help/igeditors-landingpage
The error that you see means that you are missing jQuery references. Also if you haven’t added the Infragistics references, you will need them too.
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<link href="http://cdn-na.infragistics.com/igniteui/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet"></link>
<link href="http://cdn-na.infragistics.com/igniteui/latest/css/structure/infragistics.css" rel="stylesheet"></link>
If you need further assistance, let me know.
Best Regards, Marina Stoyanova, Software Developer, Infragistics, Inc.
I tried the following and I just get some broken javascript. I should note I'm doing this in an EditorTemplate if that changes anything.
Error: '$' is undefined
@(Html.Infragistics().DateEditor().DateInputFormat("h:mm tt").DateDisplayFormat("h:mm tt").AllowNullValue(true).ButtonType(TextEditorButtonType.Spin).Value(Model).HtmlAttributes(new Dictionary<string, object>() {{"class", "form-control"}}).Render())
I'll try that.
But I'd like to point out that what I did worked in 15.1 but doesn't now in 15.2