Home All Groups Group Topic Archive Search About

Date masked textbox for user input

Author
27 Jan 2006 3:57 PM
Erik
Good Morning,
I have some users which are having difficulty entering dates in the format
MM/DD/YYYY.  I validate the user's entry, but have been asked to research
masking the textbox so the users entry will automatically display as
MM/DD/YYYY in the textbox for the entered value.
Thank you for the help, Erik

Author
27 Jan 2006 5:03 PM
Phillip Williams
There used to be a DatePicker control
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmctl298/html/vbctlDatePickerControl.asp
from Microsoft that I still use in some of my clients web applications.  You
might have to search the MSDN for how to download it if it is still available.

You can also write your own textbox control (using a Windows Control Library
application) to create and package it as .cab file to be downloaded from your
website.

But my favorite is simple JavaScript that would only take a notepad and five
minutes of your time to do as in this demo: 
http://www.webswapp.com/CodeSamples/aspnet20/ClientSideValidation.aspx

Show quoteHide quote
"Erik" wrote:

> Good Morning,
> I have some users which are having difficulty entering dates in the format
> MM/DD/YYYY.  I validate the user's entry, but have been asked to research
> masking the textbox so the users entry will automatically display as
> MM/DD/YYYY in the textbox for the entered value.
> Thank you for the help, Erik
Are all your drivers up to date? click for free checkup

Author
27 Jan 2006 5:14 PM
Erik
Good Morning Phillip,
I have added the script ("favorite" solution) to the head section of the
html file, but am getting an error on onkeypress="ValidateDate(); for the
textbox tag line.  Is there something I am missing?
Thank you, Erik

Show quoteHide quote
"Phillip Williams" wrote:

> There used to be a DatePicker control
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmctl298/html/vbctlDatePickerControl.asp
> from Microsoft that I still use in some of my clients web applications.  You
> might have to search the MSDN for how to download it if it is still available.
>
> You can also write your own textbox control (using a Windows Control Library
> application) to create and package it as .cab file to be downloaded from your
> website.
>
> But my favorite is simple JavaScript that would only take a notepad and five
> minutes of your time to do as in this demo: 
> http://www.webswapp.com/CodeSamples/aspnet20/ClientSideValidation.aspx
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "Erik" wrote:
>
> > Good Morning,
> > I have some users which are having difficulty entering dates in the format
> > MM/DD/YYYY.  I validate the user's entry, but have been asked to research
> > masking the textbox so the users entry will automatically display as
> > MM/DD/YYYY in the textbox for the entered value.
> > Thank you for the help, Erik
Author
27 Jan 2006 5:18 PM
Erik
Hi Phillip,
Please disregard the previous email.  Even though the attribute is
underlined as an error, everything executes properly.
Thank you again for another quality, elegant solution.
Erik

Show quoteHide quote
"Phillip Williams" wrote:

> There used to be a DatePicker control
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmctl298/html/vbctlDatePickerControl.asp
> from Microsoft that I still use in some of my clients web applications.  You
> might have to search the MSDN for how to download it if it is still available.
>
> You can also write your own textbox control (using a Windows Control Library
> application) to create and package it as .cab file to be downloaded from your
> website.
>
> But my favorite is simple JavaScript that would only take a notepad and five
> minutes of your time to do as in this demo: 
> http://www.webswapp.com/CodeSamples/aspnet20/ClientSideValidation.aspx
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "Erik" wrote:
>
> > Good Morning,
> > I have some users which are having difficulty entering dates in the format
> > MM/DD/YYYY.  I validate the user's entry, but have been asked to research
> > masking the textbox so the users entry will automatically display as
> > MM/DD/YYYY in the textbox for the entered value.
> > Thank you for the help, Erik
Author
27 Jan 2006 5:20 PM
Peter Blum
There are numerous DateTextBoxes with optional popup calendars available for
ASP.NET users. You can find them on the Control Gallery at www.asp.net,
www.123aspx.com, and www.411asp.net. I make one called "Peter's Date
Package" (http://www.peterblum.com/datecontrols/home.aspx). It filters out
illegal keystrokes and reformats when you tab out after applying some fuzzy
logic to identify what the user meant. There are demos on my site.

--- Peter Blum
www.PeterBlum.com
Email: PLB***@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

Show quoteHide quote
"Erik" <E***@discussions.microsoft.com> wrote in message
news:920E694A-4B4A-451F-8A5B-174346FB26DC@microsoft.com...
> Good Morning,
> I have some users which are having difficulty entering dates in the format
> MM/DD/YYYY.  I validate the user's entry, but have been asked to research
> masking the textbox so the users entry will automatically display as
> MM/DD/YYYY in the textbox for the entered value.
> Thank you for the help, Erik

Bookmark and Share

Post Thread options