Fix bug in DateFieldRenderer when no format specified

This commit is contained in:
Lance Edgar 2017-02-21 11:58:21 -06:00
parent 48713bb3cf
commit ac8c63219c

View file

@ -65,10 +65,12 @@ class DateFieldRenderer(CustomFieldRenderer, fa.DateFieldRenderer):
Date field renderer which uses jQuery UI datepicker widget when rendering
in edit mode.
"""
date_format = '%Y-%m-%d'
change_year = False
def init(self, date_format=None, change_year=False):
self.date_format = date_format
if date_format:
self.date_format = date_format
self.change_year = change_year
def render_readonly(self, **kwargs):