DatePicker.IsReadOnly = "True" does not disable Calendar control

2 posts, 0 answers
  1. Ramesh
    Ramesh avatar
    1 posts
    Member since:
    Jun 2010

    Posted 14 Apr 2011 Link to this post

    I am able to click on the calendar icon and get the Calendar to display although date selections are not updated. Setting IsEnabled = false does not help either. Do we have a workaround? 

  2. Dani
    Dani avatar
    848 posts

    Posted 15 Apr 2011 Link to this post

    Hi Ramesh,

    The ReadOnly state is designed to provide just what you described - the control is functional (you can "read' it), but selection is disabled.

    If you wish to make the Calendar PART appear disabled when the DatePicker is in ReadOnly state, you can do the following: bind the IsEnabled property of the Calendar to the IsReadOnly property of its parent with an appropriate converter. Generate the template of RadDatePicker from Blend and try the following:

    <telerik:RadCalendar x:Name="PART_Calendar" Culture="{TemplateBinding Culture}" Grid.Column="0" 
                                                             IsEnabled="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToOppositeBoolConverter}}" />

    I hope this helps.

    All the best,
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top