Date

Use the date type for date 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' => 'dd/MM/yyyy', 'pick_time' => false]
  • View context: ['format' => 'dd/MM/yyyy', 'pick_time' => false]
  • Create context: ['format' => 'dd/MM/yyyy', 'pick_time' => false]
  • Edit context: ['format' => 'dd/MM/yyyy', 'pick_time' => false]

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: 'd/m/Y'
  • View context: 'd/m/Y'
  • Create context: 'd/m/Y'
  • Edit context: '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: false
  • View context: false
  • Create context: false
  • Edit context: false

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