How do I make a textbox control to accept dates only and convert to a valid date format? I don't want to use the calander control.
e.g.
if I enter 2/17 or 2-17 or 02/17 or 2/17/2012; it will convert to
2/17/2012
thank you
How do I make a textbox control to accept dates only and convert to a valid date format? I don't want to use the calander control.
e.g.
if I enter 2/17 or 2-17 or 02/17 or 2/17/2012; it will convert to
2/17/2012
thank you
If you use the Short format for the DateTimePicker control it will only show the date, not the full calendar. Also set ShowUpDown = True to use up/down arrows instead of the calendar.
Last edited by dkahn; Feb 3rd, 2012 at 12:11 PM.
I do not want to use date/time control at all. I want to have a text box and have flexibility to enter dates in many different ways.
2/17 or 2-17 or 02/17 or 2/17/2012; it will convert to
2/17/2012
I need help, please!
Here are some resources to work thru your problem. Consider creating a class which uses IExtenderProvider Interface (see link below)
References
Standard Date and Time Format Strings
Custom Date and Time Format Strings
IExtenderProvider Interface