Date

Generates a single-line text field with a built-in datepicker widget

Field Options

None

Return Value

(string) The date, in YYYY-MM-DD HH:MM:SS format

Template Usage

<?php
// Output "2012-09-18 14:20:00"
echo $cfs->get('my_date');

// Output "September 18, 2012"
echo date('F j, Y', strtotime($cfs->get('my_date')));

// Output "2012"
echo date('Y', strtotime($cfs->get('my_date')));
?>