Textbox populated from calendar

dominican79

New member
Joined
Sep 17, 2009
Messages
2
Location
San Francisco, CA
Programming Experience
Beginner
Hello everyone,

I'm fairly new to VB.Net and programming and I'm trying to create a form application in which the user is prompted to enter a date in a textbox by clicking on a button next to it that would popup a calendar. Then the user would select a date from the calendar and the textbox would be automatically populated with the date selection. The user could also just type it in, but I would like to have some kind of validation before accepting the date. I will be converting the date to an integer in this format YYYYMMDD to pass it to a query on a SQL Server 2005 database. Don't ask me why they're storing dates as integers I have no idea I'm just working with what I have hehehee. I've been looking online and trying different things but haven't been able to figure this thing out. Thank you so much for reading my post and hope to hear from you soon.

MS
 
I suggest you use a DateTimePicker. You can get the year, month, and day from it like this:
VB.NET:
DateTimePickerName.Value.Year
DateTimePickerName.Value.Month
DateTimePickerName.Value.Day
 
Hi Pirahnaplant,

That looks like something I could use and from what I read online has built entry limitation so that the user can only pick a date from the calendar. Thanks a lot for your help I will give that a try.
 
Back
Top