Requires http://www.mattkruse.com/javascript/calendarpopup/combined_compact_source.html $picker1 = << HEREDOC_VAR; $opts['fdd']['date_of_sale'] = array( 'css' => array('postfix' => 'right-justify'), 'default' => '', 'input' => '', 'maxlen' => 10, 'name|ACP' => 'Date '.$picker1, 'name' => 'Date', 'options' => 'ACPVDFL', 'select' => 'N', 'size' => 10, 'sqlw' => 'IF($val_qas = "", NULL, $val_qas)', 'sort' => true ); Multiple date pickers. if($operation == 'Add' || $operation == 'Change'){ $picker_img = '../../mfg5util/pme-calendar.png'; $picker1 = ' '; $picker2 = '   '; $picker3 = '    '; }else{ $picker1 = ''; $picker2 = ''; $picker3 = ''; } $opts['fdd']['cruise_start_date'] = array( 'css' => array('postfix' => 'right-justify'), 'default' => '', 'help|ACP' => 'YYYY-MM-DD', 'input' => '', 'maxlen' => 10, 'name' => 'Start Date'.$picker1, 'nowrap' => true, 'options' => 'ACPVDFL', 'select' => 'T', 'size|ACP' => 10, 'sqlw' => 'TRIM("$val_as")', 'sort' => true ); // MySQL column 1: date $opts['fdd']['cruise_end_date'] = array( 'css' => array('postfix' => 'right-justify'), 'default' => '', 'help|ACP' => 'YYYY-MM-DD', 'input' => '', 'maxlen' => 10, 'name' => 'End Date'.$picker2, 'nowrap' => true, 'options' => 'ACPVDFL', 'select' => 'T', 'size|ACP' => 10, 'sqlw' => 'TRIM("$val_as")', 'sort' => true ); // MySQL column 2: date $opts['fdd']['book_by_date'] = array( 'css' => array('postfix' => 'right-justify'), 'default' => '', 'help|ACP' => 'YYYY-MM-DD', 'input' => '', 'maxlen' => 10, 'name' => 'Book By'.$picker3, 'nowrap' => true, 'options' => 'ACPVDFL', 'select' => 'T', 'size|ACP' => 10, 'sqlw' => 'TRIM("$val_as")', 'sort' => true ); // MySQL column 2: date