Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: DateTimePicker Validation

$
0
0
Hi,

In v2.1 of the Toolkit, which should be released pretty soon, you will have access to Minimum and Maximum property in DateTimePicker. You will be able to do something like :
<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"
                           Maximum="{Binding Value, ElementName=ToDatePicker}">
      </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"
                           Minimum="{Binding Value, ElementName=FromDatePicker}"/>

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>