django-bootstrap3-datetimepicker
django-bootstrap3-datetimepicker copied to clipboard
Picker always sets field to current date/time, whatever is selected
Hi, I am having this issue with the picker: it displays correctly, but the first time you click on a day, the current date and time appear in the field, instead of the selected value. After this, the field value cannot be changed, no date other than the current one can ever be entered. However, the selection indicator in the picker does change based on clicks. My code in forms.py is:
select_start_date = forms.DateTimeField(label="Select the start date and time for your request",
required=True,
widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm",
"pickSeconds": False})
)
And in the html template file the form renders to:
<script type="text/javascript">
$(function () {
$('#id_select_start_date').datetimepicker();
});
</script>
Thanks for any help!