Additionally, for Rick's answer, DisplayDateStart and DisplayDateEnd affect only the calendar, this does not prevent the user from entering a valid date outside this range.
To do this, you can create an exception to the setter in the associated property in the ViewModel or if you use IDataErrorInfo, return a validation error message through this [string columnName]
ExceptionValidationRule:
<Binding Path="SelectedDate" UpdateSourceTrigger="PropertyChanged"> <Binding.ValidationRules> <ExceptionValidationRule /> </Binding.ValidationRules> </Binding>
source share