date select in forms

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hello all,

I might ought to be asking this over in a php group, but since I am more
familiar with this group I will ask here. Hope you don't mind.

BTW Els, you should have a long time lurker sometimes poster section on
your AWW whois. I have been hanging around here since 1999.

I'm trying to create a form which will handle start date and end dates
for selecting data to be returned that was collected during that time. I
want to do this using php. I also want to make sure that leap year is
accounted for and that people will not be able to select say "June 31st".

I've googled this and am now more confused than when I started.

Any ideas how to do this or point me in the right direction? Is it
possible without refreshing a form page to have the day values change
allowing only 28 if perhaps the month and year of February 2001 was

I await your replies.


Patrick A. Smith           Assistant System Administrator
Ocean Circulation Group USF - College of Marine Science Phone: 727 553-3334

The trouble with doing something right the first time is that nobody
appreciates how difficult it was. - La Rochefoucauld

Re: date select in forms

Patrick wrote:
Quoted text here. Click to load it

Personally, I don't mind - but you probably would get better results on
a PHP group.

Quoted text here. Click to load it

I believe the native PHP date object (function?) has that built-in -

Re: date select in forms

Quoted text here. Click to load it

The only way to update the page without re-submitting the form is to use
Javascript. If this is appropriate for you, you can either have client-side
javascript validation routines or use remote-scripting/AJAX to seamlessly do
some server-side processing.

But the simplest solution is to use one of the many (javascript-based)
calendar routines, so your users can only pick valid dates...


Site Timeline