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

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

1 Answer 51 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Ramesh
Top achievements
Rank 1
Ramesh asked on 14 Apr 2011, 09:37 PM
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? 

thanks

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 15 Apr 2011, 09:26 AM
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,
Dani
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
DatePicker
Asked by
Ramesh
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or