Can someone help me to rewrite this code so that it works the way I intended?

Private Sub frm Salvage Manager Entry_Load1(By Val sender As Object, By Val e As System.

event handler displays an error message to the user.

maskedtextbox validatingtype datetime-43maskedtextbox validatingtype datetime-27maskedtextbox validatingtype datetime-2

Open sex chatroom - Maskedtextbox validatingtype datetime

I want my date fields to validate the dates entered to make sure they are valid, but I also want the user to be able to tab through the field without having to enter any date at all. I can enter 2/29/2010, but the date will not be accepted because it is not a leap year.

The problem is the field will not allow the user to leave it blank.

I find it annoying not being able to type in the date so I dismissed that control as an option.

If not, the user will get a message asking them to reenter a valid date. Show("Please input a valid date between 01/01/1930 to 01/01/2099 in the format mm/dd/yyyy.", "Invalid Date Entered", Message Box Buttons. I've tried the Date Time Picker, but I couldn't figure out how to get the control to let me type in dates instead of choosing them by clicking.

But I get a Null Reference Exception error, even when the masked text box is deinately not Null.

The properties on the masked text box include: Mask: 00/00/0000 Validating Type: Date Time Text Mask Format: Include Literals This is exactly as I have used masked textboxes on previous apps and it worked then, so why not now? private void Form1_Load(object sender, Event Args e) void masked Text Box1_Type Validation Completed(object sender, Type Validation Event Args e) // Hide the tooltip if the user starts typing again before the five-second display limit on the tooltip expires.

It was when the date was being parsed back to the datetime. Before it would work fine if it started out as null, it only doesn't work when there is a date that gets blanked out.

This may not be the most elegant way to do this, but it does work.

string reg Year [email protected]"(200[8,9]|201[0-9])"; //for year from 2008-2019 Plz correct this Reg Ex if wrong. Year Only for which i need to extract these values.

string reg Month [email protected]"(0[1-9]|1[012])"; string reg Date [email protected]"(0[1-9]|[12][0-9]|3[01])"; string [email protected]"[- /]"; string ddmmyyyy=reg Date seperator reg Month seperator reg Year; I want to return user date part, month part and year part using this.

It only breaks when there is a date already bound and I try to blank it out.