Commit 594b47df by Frédéric

Date format

parent 657968c8
...@@ -35,7 +35,7 @@ class ResaType extends AbstractType ...@@ -35,7 +35,7 @@ class ResaType extends AbstractType
[ [
'widget' => 'single_text', 'widget' => 'single_text',
'label' => false, 'label' => false,
'format' => 'dd-MM-yyyy', 'format' => 'd/m/Y',
'required' => false, 'required' => false,
]) ])
->add( ->add(
...@@ -44,7 +44,7 @@ class ResaType extends AbstractType ...@@ -44,7 +44,7 @@ class ResaType extends AbstractType
[ [
'widget' => 'single_text', 'widget' => 'single_text',
'label' => false, 'label' => false,
'format' => 'dd-MM-yyyy', 'format' => 'd/m/Y',
'required' => false 'required' => false
]) ])
->add( ->add(
......
...@@ -31,7 +31,7 @@ trait GetterSetterTrait ...@@ -31,7 +31,7 @@ trait GetterSetterTrait
public function setStartDate($startDate) public function setStartDate($startDate)
{ {
$this->startDate = $startDate; $this->startDate = (new \DateTime($startDate))->format('Y-m-d');
return $this; return $this;
} }
...@@ -49,7 +49,7 @@ trait GetterSetterTrait ...@@ -49,7 +49,7 @@ trait GetterSetterTrait
*/ */
public function setEndDate($endDate) public function setEndDate($endDate)
{ {
$this->endDate = $endDate; $this->endDate = (new \DateTime($endDate))->format('Y-m-d');
return $this; return $this;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment