|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to control/check Date datatype inputs in textobx?Hello,
I have been adding a handler to the TextBox.Leave event to check if a value that is entered in a Date Textbox is a Date. This works OK. But I am just checking if there is anything built-In to VB2005 that does this. I have already discovered several goodies that I had not previously been taking advantage of. Is there anything built-in to handle Date datatype checking for controls? Thanks, Rich Depends on how you define built-in I suppose
There is DateTime.Parse, DateTime.TryParse, DateTime.ParseExact and DateTime.TryParseExact that you can use to convert a string to a date. If by built-in you mean something like a DateTextBox, then no, there is no such control. The closest would be DateTimePicker /claes Show quoteHide quote "Rich" <R***@discussions.microsoft.com> wrote in message news:7336B0B3-3608-472C-8C19-7F4C0993BACB@microsoft.com... > Hello, > > I have been adding a handler to the TextBox.Leave event to check if a > value > that is entered in a Date Textbox is a Date. This works OK. But I am > just > checking if there is anything built-In to VB2005 that does this. I have > already discovered several goodies that I had not previously been taking > advantage of. > > Is there anything built-in to handle Date datatype checking for controls? > > Thanks, > Rich > >
Space in textBox
Auto Increment Version in VB 2005 ToolBox Icon corruption VB2005 Transparent backcolor SqlDataAdapter Questions Thread safe TextWriter question How do I copy all text files into one??? eg; Shell("copy c:\CND\dr*.txt C:\CND\TestC.txx") Problem with System.IO.File.Move and Catching Exceptions Creating ToolWindows with .NET in VBE Select node |
|||||||||||||||||||||||