date ?

rangerbud249

Active member
Joined
Aug 18, 2004
Messages
27
Programming Experience
Beginner
I have 2 textboxes that are currently being populated by a calendar. I have them set up so that the start date is never greater than my end date. The only way to input a date to these textboxes is thru the calendar. I would like to be able to allow my users to write the date, if they want, inside the textbox but I still want to validate to make sure that the data is in a date format and that the end date is greater than the beginning date.

can anyone help me?

Jose
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
use the Textbox_LostFocus event to check to see if it's a valid date then if it's a date not less than the beginning date
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
To add, use the Microsoft.VisualBasic.Information.IsDate function to check if the text entered in the textBoxs are valid dates. Then you can use a simple check to see if the end date is greater than the beginning date.
 
Top Bottom