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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manas MohapatraRank #182 · 13.2K reputationPosted Jul 12, 2015, 8:56 PM EDT
Raja TRank #685 · 3.5K reputationPosted Jul 12, 2015, 10:23 PM EDT
hadoop hadoop142 reputationPosted Jul 12, 2015, 10:50 PM EDT
Raja TRank #685 · 3.5K reputationPosted Jul 12, 2015, 10:54 PM EDT
Anshul Jain6 reputationPosted Jul 14, 2015, 11:32 PM EDT
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
Rajeesh MenothRank #118 · 18.4K reputationPosted Jul 14, 2015, 11:51 PM EDT