Fix saving eents using the new datepicker widget

This commit is contained in:
Michael Hall 2018-01-21 11:18:58 -05:00
parent 5ce3de6eec
commit dd9a836a66

View file

@ -7,6 +7,7 @@ from .models.profiles import Team
from .models.events import Event, Place
from datetime import time
from time import strptime, strftime
class LookupMedia(Media):
def render(self):
@ -136,6 +137,10 @@ class DateTimeWidget(SplitDateTimeWidget):
def format_output(self, rendered_widgets):
return '%s %s' % (rendered_widgets[0], rendered_widgets[1])
def value_from_datadict(self, data, files, name):
values = super(DateTimeWidget, self).value_from_datadict(data, files, name)
return ' '.join(values)
class TeamForm(ModelForm):
class Meta:
model = Team