Automatically Selecting Day of Week

2 posts, 0 answers
  1. Chris Andrews
    Chris Andrews avatar
    41 posts
    Member since:
    Mar 2010

    Posted 01 Oct 2011 Link to this post

    Hello All,

    We have a requirement where the SelectedDate must be a Saturday only.  We are using the MVVM pattern.  I am able to change the SelectedDate property to the Saturday, however when I re-open the calendar, the last day of week the user clicked is still highlighted.  How can I remove the highlighting, even though the SelectedDate has already been changed properly.

    For example, say the user clicks Oct 11 (a Tuesday), I want Oct 15 (Saturday) to be highlighted, not Oct 11.

    As I mentioned, the actual SelectedDate property is set just fine, it's the highlighted date I can not figure out how to remove.

    I can provide a simple test project if needed.

    Here is a screenshot of the issue.  Note the Date in the control, and what's highlighted.

  2. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 04 Oct 2011 Link to this post

    Hello Chris,

     This happens as you set the SelectedDate property while it is updating so the change is not populated back to the calendar. To overcome this problem I would suggest you to update the value after a moment using the dispatcher.BeginInvoke method (or at least to postpone the property change notification using the same approach).

    Hope this helps.

    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
Back to Top