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