selectDate example

The selectDate element type gives several customization features, including defining year limits, date display formatting and date result formatting, adding/removing nullable values, and overriding default month names - take a look at these examples!

The live form - submit it!

no null values, defaults to today

default null values

...and redefined null values

...and the months are abbreviated.

Find the "data" section below to check that the returned format is different: changes to D-M-Y!
- - , : :
Handles hours, minutes and seconds too!

Data dump

Below are the dumps of some PHP variables - submit the form to see the changes!

Contents of the $_POST array:
$_POST = array (

Results of a $clonefish->getElementValues() call:
array (
  'selectdate1' => '2018-01-22',
  'selectdate2' => NULL,
  'selectdate3' => NULL,
  'selectdate4' => NULL,
  'selectdate5' => NULL,
  'selectdate6' => NULL,

There are cases when the above arrays are different. This is not a bug, but a feature: clonefish was written to help with everyday form hassles (like avoiding the missing value of an unchecked checkbox or compiling the whole date string from date selector fields).