Calendar refresh when changing DisplayDateEnd?

4 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Aug 2014

    Posted 13 Aug 2014 Link to this post

    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.
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 14 Aug 2014 Link to this post

    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.
     
  3. DevCraft banner
  4. David
    David avatar
    3 posts
    Member since:
    Aug 2014

    Posted 14 Aug 2014 in reply to Yana Link to this post

    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!
  5. David
    David avatar
    3 posts
    Member since:
    Aug 2014

    Posted 14 Aug 2014 in reply to David Link to this post

    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!
Back to Top