Value could not be converted error when binding in TwoWay mode

0 Answers 17 Views
DateTimePicker
Sathya
Top achievements
Rank 1
Sathya asked on 11 May 2022, 07:20 PM | edited on 11 May 2022, 07:22 PM

I have used DateTimePicker with selectable date start and end, when binding the selected date with two way mode and entering the earlier date manually I am getting below error. Any idea?


<telerik:RadDateTimePicker x:Name="cmbDatePicker"
                            InputMode="DatePicker"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Width="250" 
                            Height="30"
                            IsInputRestrictedToSelectableDates="True"
                            SelectableDateStart="{Binding SelectableDateStart}"
                            SelectableDateEnd="{Binding SelectableDateEnd}"
                            SelectedDate="{Binding ScheduledDate, Mode=TwoWay}"
                            />

 

Martin Ivanov
Telerik team
commented on 16 May 2022, 09:05 AM

I've tested the code snippet on my side, but I couldn't recreate any issues. The error in your screenshot appears because when you enter empty text this cannot be converted to a valid DateTime object. Also, I am not sure what do you mean by "entering the earlier date". Can you explain this? 

I also attached my test project so you can take a look and tell me if I am missing anything.

No answers yet. Maybe you can help?

Tags
DateTimePicker
Asked by
Sathya
Top achievements
Rank 1
Share this question
or