WPF toolkit DatePicker change default value 'show calendar'

前端 未结 4 1457
时光取名叫无心
时光取名叫无心 2020-12-16 19:05

I\'m using the latest WPF toolkit, specifically the DatePicker. Everything works fine, but when no value is provided, the default \'SHOW CALEND

4条回答
  •  感动是毒
    2020-12-16 19:59

    You could also do this:

    Add a textbox and a datepicker to your form with the following settings:

    In your window.xaml:

    
        
    

    And in your window.xaml.cs:

    private void datePicker_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
        {
            textBox.Text = datePicker.SelectedDate.Value.ToString("dd.MM.yyyy");
        }
    

    The result looks like this: klick

提交回复
热议问题