Datetime

Use the datetime type for datetime doctrine fields.

Included in the PerformBaseBundle.

Options

datepicker

If true, use the interactive datepicker to set the value in forms.

This option is optional.

Allowed types: boolean

Defaults:

  • List context: true
  • View context: true
  • Create context: true
  • Edit context: true

datepicker_options

An array of options to pass to the datepicker form type, if used.

This option is optional.

Allowed types: array

Defaults:

  • List context: ['format' => 'hh:mma dd/MM/yyyy', 'pick_date' => true, 'pick_time' => true]
  • View context: ['format' => 'hh:mma dd/MM/yyyy', 'pick_date' => true, 'pick_time' => true]
  • Create context: ['format' => 'hh:mma dd/MM/yyyy', 'pick_date' => true, 'pick_time' => true]
  • Edit context: ['format' => 'hh:mma dd/MM/yyyy', 'pick_date' => true, 'pick_time' => true]

format

The format to use when displaying the value, using PHP’s date() syntax.

See https://php.net/date for more information.

This option is optional.

Allowed types: string

Defaults:

  • List context: 'g:ia d/m/Y'
  • View context: 'g:ia d/m/Y'
  • Create context: 'g:ia d/m/Y'
  • Edit context: 'g:ia d/m/Y'

human

Show the data as a human-friendly string, e.g. 10 minutes ago.

This option is optional.

Allowed types: boolean

Defaults:

  • List context: true
  • View context: false
  • Create context: true
  • Edit context: true

label

The label to use for form labels and table headings. If no label is provided, a sensible label will be created automatically.

This option is optional.

Allowed types: string

Defaults:

  • List context: No default
  • View context: No default
  • Create context: No default
  • Edit context: No default