Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
C# DateTimePicker problem
Ari
Dec 1 2011 10:13 PM
5.1k
Reply
Hey, I'm trying to use some basic input validation for two dateTimePicker controls in an application I'm building.
I'm trying to set it so that the issueDatePicker's value or date & time must be smaller (less than) that of the dueDatePicker's value or date & time.
I'm using this code which seems correct but just isn't working..
if (issueDatePicker.Value >= dueDatePicker.Value)
{
MessageBox.Show("The due date must be greater than the issue date", "Input Error");
}
else
{
issueDate = issueDatePicker.Value;
dueDate = dueDatePicker.Value;
dateCorrect = true;
}
The above code is within a button click event.
Any help is appreciated.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Updation of exe on netwrok PC
Access form from another class in c#