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

IsReadOnly (un)expected behavior?

10 Answers 95 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
devster
Top achievements
Rank 1
devster asked on 26 Jan 2010, 11:16 AM

  <telerikControlsInput:RadDatePicker x:Name="SampleDatePicker" SelectedDate={Binding BlindDate, Mode=TwoWay} IsReadOnly="true" /> 

Hello, I notice with the current release version that the result of IsReadOnly is the following:
- user can no longer edit date using the text box (expected)
- user *can* edit date via calendar. (unexpected, though convenient in my current use case)

Is this intended?
- if no, I hope there will be another easy way to get this behavior again in the future, without having to tweak the template (as suggested in other posts)

10 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 28 Jan 2010, 08:51 AM
Hi dev,

The behavior of the RadDatePicker in readonly mode is the one you have described. You can not edit the date in the TextBox but you can select a date form the calendar. We will consider changing this behavior in case there are other client's requests.

Regards,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
devster
Top achievements
Rank 1
answered on 28 Jan 2010, 09:14 AM
Thanks, I hope that the behavior will not change.
0
Kaloyan
Telerik team
answered on 01 Feb 2010, 12:06 PM
Hello dev,

The visual modification will not affect the basic functionality of the control.

Kind regards,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Matt Bohn
Top achievements
Rank 1
answered on 05 Mar 2010, 05:03 PM
I've also had issues with this.   When I set a control as read only I expect it to not allow the user to edit the value or the underlying object.  So I think the calendar drop down should be disabled if the control is Read only.
0
Kaloyan
Telerik team
answered on 11 Mar 2010, 10:33 AM
Hello Matt Bohn,

We are working on the improvement of this behavior

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.
0
Kurt
Top achievements
Rank 1
answered on 26 Mar 2010, 05:16 PM
I am evaluating the datepicker control at the moment after not being happy with another vendor's. I also am surprised and disappointed to see the ReadOnly behaviour of this control allowing edit from the calendar. While this is being looked at as you say in this post, is there a style override that we could use that hides the calendar in the in a Readonly visual state? An example from another post seems to explain how to make it work the opposite way (which now seems to be the default) Otherwise the only work around I can think of is to set the min and max dates to be the selected date when readonly.

Why oh why is it so hard to get a good datepicker in Silverlight?!
0
Kurt
Top achievements
Rank 1
answered on 26 Mar 2010, 05:42 PM

Answering some of my own post after working backwards on the similar post. I implemented hiding the dropdown button on the datepicker when readonly by modifying a copy of the template as follows:

<telerik:RadToggleButton x:Name="ToggleButtonElement" IsTabStop="False" MinWidth="15" Grid.Column="1" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanToVisibilityConverterInstance}}"

I hope this does not introduce any other unwanted behaviour. The control is now looking very promising...

0
Kaloyan
Telerik team
answered on 01 Apr 2010, 08:02 AM
Hi Kurt,

We will provide you a hot fix in one of the next internal builds. Sorry for the inconvenience caused.

Greetings,
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.
0
Todd Davis
Top achievements
Rank 1
answered on 05 Apr 2010, 02:58 PM
Just wanted to add one more vote for "Read Only means Read Only". I could care less if the calendar popup shows up or not (although it doesn't make sense to in this case) however I do care that the bound field can change data. My application works with medical data, and the date fields are crucial, and very sensitive in regards to "who can see it" vs. "who can change it".
0
Kaloyan
Telerik team
answered on 08 Apr 2010, 08:26 AM
Hi Todd Davis,

Thank you for your feedback. We will do our best to meet your requirements.

Sincerely yours,
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
devster
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
devster
Top achievements
Rank 1
Matt Bohn
Top achievements
Rank 1
Kurt
Top achievements
Rank 1
Todd Davis
Top achievements
Rank 1
Share this question
or