Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Reply
C# DateTimePicker problem
Ari
12 years ago
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.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Updation of exe on netwrok PC
Access form from another class in c#