[development] Hello from another developer/Want to add some features

Robert Douglass rob at robshouse.net
Sat Jan 28 13:26:56 UTC 2006

Sammy Spets wrote:

> AFAIK drupal doesn't have a time field with two dropdowns and a datetime
> where the date and time fields are combined into one to fully utilize 
> the timestamp type of a DB.

   $form['effective_date'] = array(
     '#type' => 'date',
     '#title' => t('Effective date'),
     '#default_value' => $node->effective_date ? array('day' => 
                             'month' => $node->effective_date[1],
                             'year' => $node->effective_date[0])
     : array('day' => format_date(time(), 'custom', 'j'),
             'month' => format_date(time(), 'custom', 'n'),
             'year' => format_date(time(), 'custom', 'Y')),
     '#required' => FALSE);

More information about the development mailing list