Skip to content
Jelle Spekken edited this page Jun 10, 2014 · 3 revisions

Field type: Date

The date field type is used to display a date input field with a date selector. This field will only show you the year, month and day. If you also want to have time, use the datetime field.

$mapper->date('field-name', 'default value')
    ->label('My great label'); // (optional) This will override the standard field label

The first argument is the field name relative to the name in your database (or overwritten via an attribute accessor)

The second argument will be the default value if non is present. This argument is of course optional but has to be formatted in a valid date string.

Clone this wiki locally