Date form - checks for more than 28 days Feb

S

Scott

if (Month==1) && Day > 29 {
alert ("You can't have more than 29 days in February)

This works as long as the day is entered before the month, however, when
someone enters February with a null (99) date, it returns this error before
the person has had a chance to enter the date.

Is there a simple way to amend the above to give the alert is month is
February and date is greater than 29, but not 99 (ie blank)?

Thanks.
 
S

Stefan B Rusynko

Easier to replace it w/ a date picker script
2/29 is not the only invalid date combo you need to check for

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|
| if (Month==1) && Day > 29 {
| alert ("You can't have more than 29 days in February)
|
| This works as long as the day is entered before the month, however, when
| someone enters February with a null (99) date, it returns this error before
| the person has had a chance to enter the date.
|
| Is there a simple way to amend the above to give the alert is month is
| February and date is greater than 29, but not 99 (ie blank)?
|
| Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top