Commit f381e72e by noraiz-anwar Committed by Noraiz Anwar

Correct date format in course run edit form

parent 75f03327
......@@ -63,7 +63,6 @@ class BaseCourseForm(forms.ModelForm):
field_classes = 'field-input input-select'
if isinstance(field, forms.DateTimeField):
field_classes = '{} add-pikaday'.format(field_classes)
field.input_formats = ['YYYY-MM-DDTHH:mm:ss']
if isinstance(field, forms.ModelMultipleChoiceField):
field_classes = 'field-input'
......
......@@ -4,11 +4,11 @@ function addDatePicker() {
if (el.getAttribute('datepicker-initialized') !== 'true') {
new Pikaday({
field: el,
format: 'YYYY-MM-DD hh:mm:ss',
format: 'YYYY-MM-DD HH:mm:ss',
defaultDate: $(el).val(),
setDefaultDate: true,
showTime: true,
use24hour: false,
use24hour: true,
autoClose: true
});
el.setAttribute('datepicker-initialized', 'true');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment