In my controller I'm getting the date from the URL :
$Birthdate=$request->get('datebirth');
and in my twig I'm creating datapicker and I have a default value from the controller.
Here is my twig:
{{ form_row(formPatient.patBirthDate,{'value' : datebirth|date('d-m-y') },{
'attr': {'class': 'datepicker-date'}}) }}
Your date format is wrong. For the HTML5 date type field it has to be the following format
Y-m-d
:So in your case:
And if this should not work, try to change the format on your formbuilder like this, too:
Read more about it in the docs: https://symfony.com/doc/current/reference/forms/types/date.html