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

MaskedDateTimeInput Validation

1 Answer 85 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
vk
Top achievements
Rank 1
vk asked on 03 Jun 2011, 11:58 AM
Hello,
I'm using RIA services and CustomValidation attribute for some fields of my business object.
There are a couple of datetime fields on a DataForm which I would like to bind to a MaskedDateTimeInput, but there are some issues regarding to validation. If I use MaskedTextBox instead of MaskedDateTimeInput the first control behaves as expected...
I have attached some screenshots to show what I mean.
Problem 1: if I enter a datetime value that does not pass validation both controls go into invalid state but the dataform's field bound to MaskedDateTimeInput doesn't get red.
Problem 2: If I tab out of MaskedDateTimeInput while it is in invalid state the control shows the value that was before the change. I expected it to show the new value like the MaskedTextBox does...

      <!-- Start date -->
 <toolkit:DataField Label="Start date" >
     <telerik:RadMaskedDateTimeInput Value="{Binding DateStarted, Mode=TwoWay}" Mask="g" /> 
 </toolkit:DataField>
  
 <!-- Finish date-->
 <toolkit:DataField Label="Finish date">
     <telerik:RadMaskedTextBox Value="{Binding DateFinished, Mode=TwoWay}" Mask="g"  MaskType="DateTime" />
 </toolkit:DataField>

1 Answer, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 08 Jun 2011, 03:55 PM
Hi Valentine,

The behavior you have come up with is expected by design: the RadMaskedDateTimeInput does not update its current value if the validation does not pass. However, we logged a feature request in our PITS where you are able to vote for in order to increase its development priority. 
Feel free to ask if you need further assistance.

Regards,
Petar Mladenov
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
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
vk
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or