I got two datepicker in my WPF canvas. What i trying to do is like the datepicker from airline website. The first calendar allow user to pick the departure date and the second calendar allow user to pick the return date. Let say i select 11/11/2012 from datapickerA, when i click on the second datepickerB, the dates before 11/11/2012 are disabled. What should i put in the datepicker?
Share
You can use the
DisplayDateStartproperty of theDatePicker. It is aDependencyProperty, so you can supply it via yourDataContextusing MVVM, or by settingDisplayDateStartof your secondDatePickertoSelectedDatefrom the firstDatePicker: