Hi,
I have a scenario I can't figure out how to implement.
I want to validate that from date is less than the to date. I am using the DateTimePicker control.
I have a scenario I can't figure out how to implement.
I want to validate that from date is less than the to date. I am using the DateTimePicker control.
<StackPanel Orientation="Horizontal" Margin="5,2,5,2">
<TextBlock Text="From Date: " />
<xctk:DateTimePicker x:Name="FromDatePicker"
AutoCloseCalendar="True"
Width="200"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Value="{Binding FromDate, Mode=TwoWay}"
Format="Custom"
FormatString="dd-MMM-yy HH:mm"
TimeFormat="Custom"
TimeFormatString="HH:mm"
ToolTip="From Date">
</xctk:DateTimePicker>
<TextBlock Text="To Date: " />
<xctk:DateTimePicker x:Name="ToDatePicker"
AutoCloseCalendar="True"
Width="200"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Value="{Binding ToDate, Mode=TwoWay}"
Format="Custom"
FormatString="dd-MMM-yy HH:mm"
TimeFormat="Custom"
TimeFormatString="HH:mm" TimeWatermark="Please select time"
ToolTip="To Date"/>
</StackPanel>
Can someone give me a hint on how to validate that the to date is greater than the from date?