RadMaskedDateTimeInput : fill with '0' after Tab pressed.

2 posts, 0 answers
  1. Ravi
    Ravi avatar
    2 posts
    Member since:
    Mar 2014

    Posted 17 Mar 2014 Link to this post

    Hi ,

    I am using RadMaskedDateTimeInput  ,Required behaviour: If i write '1' and press Tab remaining places to be filled with '0' for eg: 1 --> press tab --> 10:00.
    Please find my code below:

    <telerik:RadMaskedDateTimeInput Mask="HH:mm"
    HorizontalAlignment="Center"
    Width="40"
    Placeholder=" "
    IsClearButtonVisible="False"
    x:Name="dateTime"
    EmptyContent="00:00"
    TabIndex="0"
    Culture="en-US"
    Value="{Binding Date1,Mode=TwoWay}"
    />

    Thanks,
    Ravi Singh
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 19 Mar 2014 Link to this post

    Hi Ravi,

    Please avoid setting Placeholder to any number. The internal parsing logic excludes the Placeholder symbol from the parsing and this will produce unpredicted results.
    We prepared a sample approach for you which uses the LostFocus event of the MaskedInputBase and replaces the placeholders with zeros. Please check it out and let us know if you need further assistance on this requirement.


    Regards,
    Petar Mladenov
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. DevCraft banner
Back to Top