We want to use RadMaskedDateTimeInput to let the user enter TimeSpans fo more than 24 hours.
For example 25 hours should be displayed and entered as
25:00:00 or 01:01:00:00 (one day and one hour)
using a "HH:mm:ss" or "dd:HH:mm:ss" mask does not work!
3 Answers, 1 is accepted
0
Milena
Telerik team
answered on 15 Sep 2014, 12:31 PM
Hi Peter,
RadDateTimeInput uses a DateTime type as value and not TimeSpan. So, if you need to use TimeSpan as a Value of the MaskedInputControl you should use:
- RadMaskedTextInpud with custom mask token which takes only digits - you can see how to write this in our help topic - Mask Tokens. In your case your valid characters would be only digits and the mask would be "$$:$$:$$" to have ":" symbols between the numbers;
- use a ViewModel and custom validation rule to restrict the user input per your requirement. More about validations you can find here;
Please take a look at this topics and write us back if you need any further assistance.
Regards,
Milena
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
I got it working with a RadMaskedTextInput and Mask = "##:##:##:##".
But it's been a pain in the a... I had to write my own converter for String-TimeSpan conversion. Would be cool to have a Telerik control for TimeSpans as well.
Thanks for you answer.
0
Milena
Telerik team
answered on 19 Sep 2014, 02:33 PM
Hi Peter,
Thank you for the feedback.
Indeed, currently the required functionality is not supported in the RadMaskedInput suite. However, you can log a feature request in our Feedback portal. So, we can then further research on it and decide if it will be approved and implemented as a built-in feature.
Regards,
Milena
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.