MaskedDateTimeInput Validation

2 posts, 1 answers
  1. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 03 Jun 2011 Link to this post

    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>
  2. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 08 Jun 2011 Link to this post

    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
  3. DevCraft banner
Back to Top