I'm trying to add date Filters to my form in ZF3. So in my FooForm I implemented the InputFilterProviderInterface and down in my method I got :
public function getInputFilterSpecification()
{
return [
'BarInput' => [
'validators' => [
[
'name' => StringLength::class,
'options' => [
'min' => 2,
'max' => 5,
],
],
],
'filters' => [
[
'name' => 'Zend\Filter\Date?'
]
So for the filters I have no idea what to put for a date (I checked the documentation, but I was clueless). My dateInput is a string and I want to output a \DateTimeImmutable, for saving it correctly in my controller.
I found the answer in the vendor file :
Be careful about the format because Chrome format sent is not as it displays.