Setting Mindate and MaxDate for Datepicker Control

前端 未结 3 901
小蘑菇
小蘑菇 2021-01-19 07:36

I\'m currently using DatePicker’s control, where I tried to limit the dates to show MinDate & Maxdate. Unfortunately I couldn\'t find any related method to set the Min a

3条回答
  •  无人及你
    2021-01-19 07:48

    If you use DatePicker control (.net Framework >= 4.0) you can bind it also directly in the XAML code like this :

    
     
    
    

    and if you use DateTimePicker control from Xceed Extended WPF toolkit you can bind Maximum Property the same way as DisplayDateEnd for DatePicker.

    p.s. Don't forget to add folowing to your XAML file header:

    xmlns:System="clr-namespace:System;assembly=mscorlib"
    

提交回复
热议问题