Jump to content

Dynamic Date Drop Downs


coupe-r

Recommended Posts

Hey guys,

 

Can anyone point me in the right direction for the code for dynamic date drop downs?

 

Basically, I only want the DAY drop down to populate the amount of days in the month that is selected.  Here is how I see if working...

 

The month, day and year boxes are all set to todays date.  When I choose a new month, the day box automatically changes to show either 31, 30 or 28 if Feb, without clicking a button.

 

Any help would be great.

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/196030-dynamic-date-drop-downs/
Share on other sites

Do a google. The javascript site have lots of dynamic drop-downs.

this is the php code for the days in a month

date("t", strtotime('2010-2-1'));//do not set day to 0,may be set to 1

date("t", strtotime("$year-$month-$day"));

 

 

HTH

Teamatomic

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.