I've two DateTimePicker controls, one is dtp_fromdate and another is dtp_todate.
How can I validate that ,
1. from date and to date should not be greater than today's date
2. from date should be small than to date
Thanks!!!
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeesh MenothPosted Jul 15, 2015, 3:51 AM
Anshul JainPosted Jul 15, 2015, 3:32 AM
Its easy to validate datetimepicker control
Sol 1: Set max date of both the controls to current date on form load event
As
so no one can select greater date from Today.
Sol 2: Simply check the condition
dtp_fromdate.Value < dtp_todate.Value
If its work please accept the reply
With Thanks
-----------------
web design in agra
Raja TPosted Jul 13, 2015, 2:54 AM
hadoop hadoopPosted Jul 13, 2015, 2:50 AM
Raja TPosted Jul 13, 2015, 2:23 AM
Manas MohapatraPosted Jul 13, 2015, 12:56 AM