BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Thanks for using Syncfusion Products.
We are afraid that we are unable to reproduce
the issue reported by you. Can you please attach the full sample in this
incident or modify our sample , so that we could sort out the cause of the
issue and provide you a solution. Please find the
sample from the attachment.
Please let us know if you would require any
further assistance.
Regards,
Madhu Sudhanan. P
Hi Rajesh,
We suggest you to pass the DateFormat and Value through model from the controller to achieve this behavior. Please find the below code for the same,
<code>
public ActionResult Index()
{
Incident inc =new Incident();
inc.datepicker1 =System.DateTime.Now;
DatePickerProperties datemodel = new DatePickerProperties();
datemodel.Locale = "en-US";
datemodel.DateFormat = "dd-MM-yyyy";
ViewData["date"] = datemodel;
return View(inc);
}
</code>
And please find the below code for the view page to render DatePickerFor control,
<code>
@Html.EJ().DatePickerFor(model => model.datepicker1, (Syncfusion.JavaScript.Models.DatePickerProperties)ViewData["date"])
</code>
Also, we have prepared the sample based on this and please find the sample under the following location,
Sample: DatePickerFor Sample
Please let us know if you have further queries.
Regards,
Kasithangam