Re: DateInput not accepting format argument

2019-06-10 Thread Sithembewena L. Dube
Thanks @Joe. I had been trying to avoid using a third party app if I could help it. I ended up using the default Django DateTime widget as-is. Will try out your recommendation if the need arises. Kind regards, Lloyd *Sent with Shift

Re: DateInput not accepting format argument

2019-06-07 Thread Joe Reitman
Or a better option is to use a third party app such as https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/index.html On Friday, June 7, 2019 at 1:05:04 PM UTC-5, Joe Reitman wrote: > > Try this: > > in settings.py > > USE_L10N = False > > USE_TZ = True > > DATE_INPUT_FORMATS = ['%B

Re: DateInput not accepting format argument

2019-06-07 Thread Joe Reitman
Try this: in settings.py USE_L10N = False USE_TZ = True DATE_INPUT_FORMATS = ['%B %d, %Y'] In forms.py start_date = forms.DateField( widget=forms.DateInput(attrs={'placeholder': 'October 24, 2019'}), ) On Friday, June 7, 2019 at 5:36:30 AM UTC-5, Dube Software wrote: > > Hi, > > I have

DateInput not accepting format argument

2019-06-07 Thread Sithembewena L. Dube
Hi, I have a form with a start_date field of type DateField (widget is DateInput). When I specify a format argument, the input does not render as specified. The format is always -MM-DD. My code is as follows: ``` start_date = forms.DateField( label='Start date', widget=forms.widgets.DateInpu