user3865601
user3865601

Reputation: 39

how can I restrict to user to select only a specific time range in datetimepicker windows c#

how can I restrict to user to select only a specific time range in "datetimepicker" control windows c#.

Thanks in advance...

Upvotes: 0

Views: 61

Answers (1)

Mustafa ASAN
Mustafa ASAN

Reputation: 3825

Set the MinDate and MaxDate.

   dtPicker1.MinDate = new DateTime(2000, 6, 20);
   dtPicker1.MaxDate = DateTime.Today;

Upvotes: 1

Related Questions