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

Calendar refresh when changing DisplayDateEnd?

3 Answers 62 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 13 Aug 2014, 10:15 PM
Is it possible to force the calendar to refresh after changing the DisplayDateEnd? I have a control that has a default DisplayDateEnd when it is created, but can be updated programmatically. When this happens the ending date on the calendar remains at the old value unless I take an action such as going back a month and then returning to the original month. I tried making the month change programmatically but this still did not force the calendar to refresh.

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 14 Aug 2014, 12:27 PM
Hi David,

I have tested the explained scenario and if you change the DisplayDateEnd on a button click, for example, the DatePicker is updated without a problem.

Could you please describe the exact use case in more details and if possible send us some sample code that we can test?


Regards,
Yana
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
David
Top achievements
Rank 1
answered on 14 Aug 2014, 04:10 PM
The situation I have is an application with multiple "tabs", one of which has a DateTimePicker on it. Both DisplayDateEnd and SelectableDateEnd are bound to a source property named EndDate. The value of this control is not allowed to be in the future which is fine for the most part. The problem I'm having is if the control is loaded just before midnight, then the user goes to another tab and returns to this one after midnight. When this happens I am programmatically updating EndDate to the new day, as well as updating the control text date and time to the current date/time. The problem is when I popup the calendar the maximum date on the calendar is still the previous day instead of the current day as I would expect. At this point if I click on another month and come back the correct maximum date is displayed. If I instead switch to another tab in the application and come back the correct maximum date is displayed. So I'm wondering if the calendar should be updating and/or if there's a way to force the calendar to update. Thanks!
0
David
Top achievements
Rank 1
answered on 14 Aug 2014, 05:24 PM
I apologize, the problem was with my code. I didn't have the binding set to TwoWay. As soon as I did that everything started working. Thanks for your help!
Tags
DateTimePicker
Asked by
David
Top achievements
Rank 1
Answers by
Yana
Telerik team
David
Top achievements
Rank 1
Share this question
or