DateTimePicker Should only show Current Date

.net, c#, datetimepicker

Solution

You should be able to do that setting the MinDate and MaxDate properties.

 dateTimePicker1.MinDate = dateTimePicker1.MaxDate = DateTime.Now;

According to some, this should actually throw a `DoesntMakeSenseException` , but... maybe it should be reported as a bug...

Problem

Possible Duplicate: Limiting the dates within a C# win form DateTimePicker in C#, is it possible to Only Set the DateTimePicker to the current date only? the users cannot select back to a previous or future dates. The DateTimePicker will only show or have the current Date.

Original source

Related problems