Looking at http://api.drupal.org/api/HEAD/file/developer/topics/forms_api_reference...

It says: "The #default_value will be today's date if no value is supplied."

I've found this to be incorrect. For me the date always defaulted to Jan 1, 1900, if no value was specified. One other person in #drupal confirmed this as well. If I didn't have a saved value to provide, I had to specify an array based on date('Y'), date('n') and date('j') to default to today.

Comments

mpare’s picture

Just change one line of code, here is a link to a patch...
http://drupal.org/node/148876

enjoy!

Peace,
-mpare
www.paretech.com

Did you figure out how to do something? Did you find documentation on Drupal.org inadequate? Well now it's your turn. Document your Success!

mpare’s picture

Additionally I think this issue has been resolved as of drupal-5.2 so check your site and upgrade.

Peace,
-mpare
www.paretech.com

Did you figure out how to do something? Did you find documentation on Drupal.org inadequate? Well now it's your turn. Document your Success!