BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Andrea,
Sorry for the Inconvenience caused.
We have analyzed the reported issue (When the Unobtrusive Support is turned off, the DatePickerFor renders as a simple textbox and not as the DatePicker) and we are not able to reproduce it.
We have prepared a simple sample based on your requirement. You can also download the attached sample from the following location.
Sample: Sample
In the above sample, we have used the DatePickerFor with the form. When we submit the form the selected date value is send in postback. The submitted date value displayed in the view page.
We have also tried this with the grid sample. In this sample also we cannot reproduce the above reported issue. Both the controls are working fine.
If you still face any problems, please revert back us the attached sample with replication procedure. So that we could provide the exact solution at earliest.
Please let us know if you have any queries.
Regards,
Kaliswaran S
public class Incident { public Incident() { TempContainer = new Container(); } DateTime dt = DateTime.Now; public DateTime datepicker1 { get; set; } public Container TempContainer { get; set; } } public class Container { public DateTime TempDate { get; set; } public Container() { TempDate = DateTime.Now.AddMonths(2); } }
<div class="datepickerDiv"> @Html.EJ().DatePickerFor(model => model.datepicker1, (Syncfusion.JavaScript.Models.DatePickerProperties)ViewData["date"]) </div> <div class="datepickerDiv"> @Html.EJ().DatePickerFor(model => model.TempContainer.TempDate, (Syncfusion.JavaScript.Models.DatePickerProperties)ViewData["date"]) </div>
Hi Andrea,
Sorry about the Inconvenience caused.
We are able to reproduce the reported issue (When I use two DatePickerFor in same page with different Properties, The first DatePicker renders correctly, the second is a simple Textbox). We have confirmed this as a defect and an issue report has been logged for this. Fix for this issue will be available in our upcoming service pack release for ASP.NET MVC which is expected to be rolled out at the end of this month (January 2015). We will notify you once our service pack release is rolled out.
If you are in need of a solution sooner, then please let us know about this. So that we could provide a patch for this issue before service pack release.
Please let us know if you have any queries.
Regards,
Kaliswaran S
Hi Andrea,
Thanks for your update.
Query: I just noticed that the DatePickerFor problem appears even on the DropDownListFor. Maybe is a more general problem that happens with Other MVC Helpers.
We have already validated the above reported issue for all “Form” controls not only for “DataPickerFor” and we will deliver the fix for all “Form” controls.
Please let us know if you have any queries.
Regards,
Kaliswaran S