I use type="date" in input
tags for signal date input and trigger the date picker behaviour in browsers. All works well in my local test environment but when running on PythonAnywhere, it doesn't display correctly: it displays "dd / mm / yyyy" in the field area when the form loads instead of the stored or, if a new object, initial value.
The major difference between the two environments that I would think relevant is the DB which goes from sqlite3 to Posgres. However the values do get stored correctly, they just don't render when the form first loads.
The model field is: models.DateTimeField(blank=True, null=True)
and the widget is: forms.DateInput(attrs={'type': 'date', 'class': 'form-control'})
When I inspect the page source it explains what the problem is but doesn't suggest a solution. In my test environment the tag is, correctly:
<input type="date" name="start_on" value="2018-04-11" class="form-control" id="id_start_on" />
In the live environment it is instead:
<input type="date" name="start_on" value="11/04/2018" class="form-control" id="id_start_on" />
can someone suggest why the two environments behave differently and how I can fix the live version?
Many thanks for your help