hi,
i have a two datetime picker in a C# form,
when i select a earlier date (before today date) there is a caparison i have addded to the validateing event in the date timepicker.below is the code.
Question 1:
for some reason say that i add 10th may, the messagebox msg will iterate until it comes to the current date.why is this happening.
Question 2:
the evet is fired only whe i select the other datetime picker.them is will give the previous datetimepicker message box error and open the datetimepicker of the secomd datetimepicker combo box
how can i solve this,
please help
thanx
appriciate a lot
thanxxxx
if (System.DateTime.Compare(dpStartD.Value, DateTime.Now) < 0)
{
System.Windows.Forms.MessageBox.Show("Invalid Session Start Date");
dpStartD.Text = DateTime.Now.ToString();
}