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.
Unfortunately, activation email could not send to your email. Please try again.

DatePicker contol does not show date in the textbox

Thread ID:

Created:

Updated:

Platform:

Replies:

88198 Jul 16,2009 08:26 PM Jul 17,2009 07:50 AM ASP.NET MVC (Classic) 1
loading
Tags: Tools
Nimish Bhonsale
Asked On July 16, 2009 08:26 PM

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


Muthukumar L [Syncfusion]
Replied On July 17, 2009 07:50 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;