Naeem Khan

Naeem Khan

  • 976
  • 802
  • 799.8k

problem in Date Time Picker in C#

Dec 22 2009 6:02 AM
hello every one ,
i have problem in date time picker actually i m putting validation for cheque date .. it should not be greater than 180 days . because cheque id valid for 180 days so user only can put date from today dates to 180 days .. is it pssoible in c#.. if yes than let me know.. this is my code please check it ....

if (dtp_cheque_date.Value < DateTime.Today)
            {
                MessageBox.Show("Cheque Date cannot be less than today!");
                dtp_cheque_date.Value = DateTime.Today;
            }

thanks in Advance
 

Answers (2)