Restrict dates in 'datetimepicker' in C#

Posted by Jordan-C on Stack Overflow See other posts from Stack Overflow or by Jordan-C
Published on 2012-09-12T09:36:29Z Indexed on 2012/09/12 9:38 UTC
Read the original article Hit count: 338

A feature of a forms based application I am developing allows the user to search through a history of records.

The user can search by name, by number, and between dates, and populate the results in a datagridview control.

Here is the form:

However, as the form will be used to search for previous records. The ability for the user to select future dates is not required.

Is there a way to prevent the user from selecting future dates, or even grey the future dates out?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .net-3.5