This is a migrated thread and some comments may be shown as answers.

[Solved] Updating DatePicker

1 Answer 28 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
siva
Top achievements
Rank 1
siva asked on 19 Mar 2010, 03:59 PM
I have used the following code to create a date picker in my page

<% Html.RenderPartial("HLDatePickerView", new ViewDataDictionary
                                {
                               new KeyValuePair<string, object>("ControlStyle", Model.ControlStyle),
                               new KeyValuePair<string, object>("InitializeControlAction",
                                   new Action<Telerik.Web.UI.RadDatePicker>(c=>
                                   {
                                       c.ID = "StartDate";
                                       c.Calendar.Width= Unit.Pixel(250);
                                       c.MinDate = new DateTime(1900,1,1);
                                       c.Height=Unit.Pixel(15);
                                       c.Width=Unit.Pixel(195);                                                                                   
                                   })),
                               new KeyValuePair<string, object>("DateValue", Model.StartDate)                               
                           }); %>



And in another client side event i am updating the datepicker value as
 $('#StartDate').val("03/29/2010");

The datepicker value is updated. But whenever the focus is set (manual mouseclick) to the raddatetime, the new date is replaced by the old date.

Please help

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 19 Mar 2010, 05:49 PM
Hello siva,

I could not reproduce the depicted issue. Please verify that you are using latest official release of Telerik Components for ASP.NET MVC. You can also verify that all required scripts are registered ?

For your convenience I have attached a simple test project.

All the best,
Georgi Krustev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Date/Time Pickers
Asked by
siva
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or