Sipum,
I have tried many possibilities and it is some how fixed and I actually don't know why, like why it is broken.........
but if you look into the class DateInput provided by Django:
class DateInput(DateTimeBaseInput):
format_key = 'DATE_INPUT_FORMATS'
template_name = 'django/forms/widgets/date.html'
it does the same thing, and the template only includes the template same as DateTimeBaseInput(which I don't get it)
so I end up inheriting the Django DateInput to create my own DateInput, all I need is change the input_type
from django.forms.widgets import DateInput as djangoDateInput
class DateInput(djangoDateInput):
input_type = 'date'
or consider what sachin said, simply set format_key = '%Y-%m-%d'
ANi於 2019年8月6日星期二 UTC+8下午2時28分24秒寫道: