Follow this documentation: https://flatpickr.js.org/formatting/
You probably want something like Y-m-d H:i:S
, adapt as needed.
Do NOT use m
for minutes, it's for months.
Follow this documentation: https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax
You probably want something like y-MM-dd HH:mm:s
, adapt as needed.
Do NOT use https://www.php.net/manual/en/datetime.format.php syntaxes. Potential traps:
Y
for year, which tends to have a 1 year offsetD
for day of the month (it's for a 3 letters textual representation in that documentation but anyway), which is for day of the year, so if your test date is in January you won't notice anything wrong.
Follow this documentation: https://www.php.net/manual/en/datetime.format.php
You probably want something like Y-m-d H:i:s
, adapt as needed.
Do NOT use m
for minutes, it's for months.