[support] Date Field in Form in D5

Fred Jones fredthejonester at gmail.com
Thu Sep 4 13:03:26 UTC 2008


I am not succeeding to create a date field. I have the Date, Date API
and the JCalendar modules installed on Drupal 5 and I tried:

			$from_date = array
			(
				'#name'=> 'from_date_'.$dao->id,
				'#type' => 'textfield',
				'#title' => 'FRom date',
				'#description' => 'test',
                                '#attributes' => array('class' => 'jscalendar'),
			);
echo theme('textfield',$from_date);

for JCalendar and this fails.

I tried:
               $from_date = array
			(
				'#name'=> 'from_date_'.$dao->id,
				'#type' => 'date',
				'#title' => 'FRom date',
				'#description' => 'test',
			);
echo theme('date',$from_date);

for a regular Date field and this fails. I also added

  include_once(drupal_get_path('module', 'date_api') .'/date.inc'); //
Include the API.

before the echo and this fails.

Can anyone point out what I am doing wrong here?


More information about the support mailing list