We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

DatePicker contol does not show date in the textbox

Hi,

We are trying to assign the date from the model to the datepicker. However, we are not able to display the date in the textbox of the datepicker control. The date seen in the Calendar dialog is correct, however by default no text is displayed on load of the page.

We have the following code:

Controller:
------------
var pickerModel = new DatePickerModel
{
DisplayDefaultDateOnLoad = true,
DefaultDate = Model.DateOfBirth.Value,
};
ViewData["DoBModel"] = pickerModel;


View:
------
<%= Html.DatePicker("DoBModel")%>

Am I missing something here?

Thanks,
Nimish


1 Reply

ML Muthukumar L Syncfusion Team July 17, 2009 11:50 AM UTC

Hi Nimish,

Thanks for evaluating Syncfusion products.

We regret to let you know that jQuery don’t supporting for loading default date at initial load.

DefaultDate Property is used to set the date to highlight on first opening if the field is blank

Please refer the following link:
http://docs.jquery.com/UI/API/1.7.1/Datepicker#options

This feature is available in the next release

Thanks for your patience.

Thanks,
Muthukumar.L


Loader.
Live Chat Icon For mobile
Up arrow icon