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

How do I not allow user to type into control but select date from control?

3 Answers 47 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Anthony Pieper
Top achievements
Rank 1
Anthony Pieper asked on 21 Jul 2009, 08:53 PM
I am currently setting the IsReadOnly property to true and this doesn't allow the user to type into the control, which is good, however it is not allowing the user to select a date within the control.

I want to limit the user to only select dates on the calendar AND not be able to type in a date.

Is there a property or properties to set to allow this behavior?

Thanks

3 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 23 Jul 2009, 03:43 PM
Hi Anthony Pieper,

This one is intended. However you can achieve the wanted scenario by editing the Control Template. Just edit in Blend and then find the where is the Calendar style and remove the IsReadOnly binding. In such way only the textbox will become ReadOnly and not the calendar.
I have attached a sample project . If you need more help please let me know.

All the best,
Boyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aeroth
Top achievements
Rank 1
answered on 06 Oct 2010, 07:45 AM
How do I achieve this programmatically because my DatePickers are created dynamically. There's no xaml file to edit...
Thanks !
0
Kaloyan
Telerik team
answered on 06 Oct 2010, 10:19 AM
Hi Aeroth,

Put the style of the control as a resources in your app.xaml. Then in the declaration of the datepicker set the style as:

var radDatePicekr = new RadDatePicker { Style = this.Resources["RadDatePickerStyle1"] };

All the best,
Kaloyan
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
Anthony Pieper
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Aeroth
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or