Hey Ani,

Change format_key = DATE_INPUT_FORMATS.
Omit the quotes. Then will work fine.


On Tue, 6 Aug, 2019, 11:59 AM ANi, <[email protected]> wrote:

> I've change the default date field widget slightly,
> but only like this and also define the DATE_INPUT_FORMATS
>
>
>
> class DateInput(DateTimeBaseInput):
> input_type = 'date'
> format_key = 'DATE_INPUT_FORMATS'
>
>
> DATE_INPUT_FORMATS = [
> '%Y-%m-%d',
> ]
>
>
> but still get error on the date field, only success at the first time
> after I restart the server
>
> any reason could be?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6d5257f5-e7aa-41ff-a0f7-8d4936e73167%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/6d5257f5-e7aa-41ff-a0f7-8d4936e73167%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGHZBzymjKTT0cAWna6ezf%3DsPmJAvkkDTd0i9oDjK2pqpm%2Bj6A%40mail.gmail.com.

Reply via email to