A
A
AlpineMilk2018-04-22 00:45:50
symfony
AlpineMilk, 2018-04-22 00:45:50

How to transfer data from a database with a date type to an input with a date type?

How to transfer data from a database with a date type to an input with a date type? in the template in the input I write

<input type="date" class="form-control" name="birthday"value="{{ patient.birthday|date("dd.mm.YY") }}">

but the data is not replaced, but remains the same
5adbb108d57ca525048111.png
, I also tried to write like this: date("dd.mm.YYYY"), but also without success) tell me please, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Sevirinov, 2018-04-22
@sevirinov

You need to substitute data in the format YYYY-MM-DD then everything will work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question