427. Class

427.1. Zend\Form\Element\DateTime

427.1.1. Methods

427.1.1.1. setOptions

setOptions()

Accepted options for DateTime: - format: A DateTime compatible string

Parameters:array|Traversable
Return type:DateTime

427.1.1.2. getValue

getValue()

Retrieve the element value

If the value is a DateTime object, and $returnFormattedValue is true (the default), we return the string representation using the currently registered format.

If $returnFormattedValue is false, the original value will be returned, regardless of type.

Parameters:bool
Return type:mixed

427.1.1.3. setFormat

setFormat()

Set value for format

Parameters:string
Return type:DateTime

427.1.1.4. getFormat

getFormat()

Retrieve the DateTime format to use for the value

Return type:string

427.1.1.5. getValidators

getValidators()

Get validators

Return type:array

427.1.1.6. getDateValidator

getDateValidator()

Retrieves a Date Validator configured for a DateTime Input type

Return type:DateTime

427.1.1.7. getStepValidator

getStepValidator()

Retrieves a DateStep Validator configured for a DateTime Input type

Return type:DateTime

427.1.1.8. getInputSpecification

getInputSpecification()

Provide default input rules for this element

Attaches default validators for the datetime input.

Return type:array

427.1.2. Constants

427.1.2.1. DATETIME_FORMAT