Is it possible in DateTimePicker
, disable the days before the current day?
Is it possible in DateTimePicker
, disable the days before the current day?
You can do this by adding the dates you want in MinDate
" and MaxDate
", obviously the minimum can be the shortest valid date and the maximum the day before yesterday. Something like this:
this.dateTimePicker1.MaxDate = DateTime.Today.AddDays(-1);
this.dateTimePicker1.MinDate = DateTimePicker.MinimumDateTime;
The question has changed midway but the answer remains the same, as the control changes but the MinDate
" and MaxDate
are identical.