28 Jan
2006
28 Jan
'06
2:26 p.m.
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' => $node->effective_date[2], '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);