[Django]-Enter a valid date/time for DatetimeInput on Django Form

3👍

According to your expression

%d/%m/%Y %H:%M:%S

Your date should contain 4 digits for year, eg: 14/02/2017 10:34:52

If you want to use 2 digits for year, should be with minuscule ‘y’, something like this:

%d/%m/%y %H:%M:%S

Anyway, I’m not sure if it will be fine for django datetime fields.

Hope it helps

Leave a comment