Validate DateTimePicker Control in C#.Net [Resolved]

Posted by Naraayanan under C# on 8/16/2012 | Points: 10 | Views : 5655 | Status : [Member] | Replies : 3
Hi All,
How to set One DateTimePicker MinDate and MaxDate?
This is code for Set MinDate or MaxDate Property of One DateTimePicker
DateTimePicker1.MinDate = "04/01/2012";
Or
DateTimePicker1.MaxDate = "03/31/2013"
;

But I want to validate selected value.
Note:Selected Value should not Exceed MinDate and MaxDate Value.Please help Me

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/



Responses

Posted by: Srilu.Nayini577 on: 8/16/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
In properties window of datetimepicker control,set

MaxDate=03/31/2013
MinDate=04/01/2012

When we running application,We can select only the datetime within the given range only.DateTimepicker can enable only within the given range only.

Thank You,

SRILATHA
.Net Developer

Naraayanan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Srilu.Nayini577 on: 8/16/2012 [Member] Starter | Points: 25

Up
0
Down
I think no need of validation

SRILATHA
.Net Developer

Naraayanan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 8/16/2012 [Member] Starter | Points: 25

Up
0
Down
Hi ,
Thanks .

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Naraayanan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response