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

RadMaskedDateTimeInput : fill with '0' after Tab pressed.

1 Answer 11 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 17 Mar 2014, 02:56 PM
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

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 19 Mar 2014, 12:55 PM
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.

 
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Ravi
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or