I've found that one of the easiest methods is to have 3 small text boxes,
that auto-tab (via javascript) after two characters.  When submitted, I
concat them into a date string, then run through data validation.
If IsDate(dateStr) = FALSE Then
    response.write "Invalid date entered"
    strError  = "TRUE"
End If

Later, if strError = "TRUE" Then I pop the form back up with the form fields
filled out with what they had entered.

I also like to use some javascript date pickers that are pretty good.  The
user clicks a calendar icon and a calendar pops up.  When they click the
date, it's inserted into the form in the correct format.

Try a search for date pickers and see what you can find if you'd prefer
that.


----- Original Message ----- 
From: "BobFilipiak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 28, 2004 8:22 AM
Subject: Re: [ASP] How to mask textbox for specified format


> You can create three dropdown list one for each: years, months, and days
and
> then do a client side onsubmit  function that validates the date and
> concatenates them into a string in the format you want into a hidden field
> and submits the form.
>
> Bob Filipiak
> A question not asked
>   is a lost opportunity to learn.
> ----- Original Message ----- 
> From: "Pankaj Sutradhar" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, May 28, 2004 7:49 AM
> Subject: [ASP] How to mask textbox for specified format
>
>
> > Hi,
> >
> > How can i mask my textbox in html form so that it will accept only date
in
> defined format only say (yyyy/mm/dd) etc. So that it will allow user to
type
> date in defines format only.
> >
> > a kind help is requsted.......
> >
> > pankaj
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> > --------------------------------------------------------------------- 
> >  Home       : http://groups.yahoo.com/group/active-server-pages
> > ---------------------------------------------------------------------
> >  Post       : [EMAIL PROTECTED]
> >  Subscribe  : [EMAIL PROTECTED]
> >  Unsubscribe: [EMAIL PROTECTED]
> > --------------------------------------------------------------------- 
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>
>
>
>
> --------------------------------------------------------------------- 
>  Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
>  Post       : [EMAIL PROTECTED]
>  Subscribe  : [EMAIL PROTECTED]
>  Unsubscribe: [EMAIL PROTECTED]
> --------------------------------------------------------------------- 
> Yahoo! Groups Links
>
>
>
>
>
>
>




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to