When working with the MaskedInput
controls, it's important to have in mind that they process their values based on the defined Mask
. That essentially means that the MaskedInput
controls, the RadMaskedDateTimeInput
included, consider a value entered only when its size and content match the Mask
restrictions. This is why when you set a Mask
", the MaskedDateTimeInput
control expects a value of this type to be entered. And if you only enter the day, the control won't understand this value as a correctly entered value and it won't be able to process it. The ValueChanging/ValueChanged
events won't be fired and even if you try to attach a handler for the MaskedDateTimeInput LostFocus
event, you'll notice that the Value
properties of the control aren't updated - they hold the last valid value of the control until a new valid value is entered.
This is why we previously suggested creating a Mask
that only requires a day entrance and then auto-completes the date using the current month and year through a converter.
Also, I am not sure why you needed to create a custom RadDateTimePicker
-like control. If the RadDateTimePicker
functionality is what you need but you would also like to control the date format, then you can apply a custom culture
on the control to set the format of the entered value.
I hope this information will help you better understand the context of the controls and use them to implement your scenario.
All the best,
the Telerik team