You can consider using the
DateTimePicker
ValueChanged
event[
^].
Handle this event, read the date value (from the event's parameters) and if the data does not meet the condition, display a message box similar to the way you were doing this for the
textbox
.