RAD MaskedDateTimeInput Incorrect behavior when Enter 31st

1 Answer 77 Views
MaskedInput (Numeric, DateTime, Text, Currency)
Kishorekumar
Top achievements
Rank 1
Veteran
Kishorekumar asked on 09 Sep 2021, 08:53 AM | edited on 09 Sep 2021, 08:55 AM

Hi Telerik Team,

I have some few question regarding telerik:RadMaskedDateTimeInput Control

telerik:RadMaskedDateTimeInput:
I have a telerik:RadMaskedDateTimeInput Control which has a default date as 08/09/21. We want to change the date to 31/10/2021.
When the user enters 31 in the date field, the control is taking the month into consideration and changing the date automatically to 30 since there is no 31 in the month of September
So first I have to change the month field and then date field to get the new proposed date 31/10/2021.
Any Possibility to change the behaviour.

The property I have used is 
        <telerik:RadMaskedDateTimeInput
          Culture="{x:Static globalization:CultureInfo.InvariantCulture}"
          DataContext="{Binding Path=UiArrivalDateObject, Mode=TwoWay}"
          FontSize="10"
          InputBehavior="Replace"
          IsClearButtonVisible="False"
          Mask="dd/MM/yy HH:mm"
          PreviewKeyDown="RadMaskedDateTimeInput_PreviewKeyDown"
          SectionsNavigationMode="Cycle"
          SelectionOnFocus="CaretToBeginning"
          TextMode="PlainText"
          UpdateValueEvent="PropertyChanged"
          Value="{Binding Path=LiveDateBerth, Mode=TwoWay, UpdateSourceTrigger=LostFocus, Converter={StaticResource DateTimeOffsetToDateTimeConverter}}">
</telerik:RadMaskedDateTimeInput>

Thanks In Advance
Regards,
Kishore Kumar

                          

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 14 Sep 2021, 08:38 AM

Hello Kishorekumar,

I have already replied to your question in this forum thread. I pasting the answer so that we can continue the conversation here.

This behavior comes from the fact that the UpdateValueEvent property is set to PropertyChanged. This means that the Value will try to validate every keystroke. To change this you can set this property to LostFocus. Can you try this approach and let me know if it is working for you?

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Kishorekumar
Top achievements
Rank 1
Veteran
commented on 15 Sep 2021, 07:06 AM

Hi Dinko,

Can you reply to this thread https://www.telerik.com/forums/rad-combo-box-text-focus-issue.

Thanks In Advance
Regards,
Kishore Kumar

Dinko | Tech Support Engineer
Telerik team
commented on 15 Sep 2021, 11:31 AM

I have replied to your question in the mentioned forum thread.
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Kishorekumar
Top achievements
Rank 1
Veteran
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or