diff --git a/src/formrender.py b/src/formrender.py index 95bd7ba..980f982 100644 --- a/src/formrender.py +++ b/src/formrender.py @@ -44,7 +44,7 @@ class FormRender(object): u'max="{maxval}" step="any" name="{name}" ' u'value="{value}" class="{classes}" style="{style}" />', "date": u'', "file": u'', @@ -134,13 +134,13 @@ class FormRender(object): return tpl.format(name=name, value=value, minval=minval, maxval=maxval, required=required, classes=classes, style=style) - def r_field_date(self, name, value, min='', max='', required=False, + def r_field_date(self, name, value, minval='', maxval='', required=False, classes='', style=""): """ Render a date field to HTML. """ tpl = self.field_tpl['date'] - return tpl.format(name=name, value=value, min=min, max=max, + return tpl.format(name=name, value=value, minval=minval, maxval=maxval, required=required, classes=classes, style=style) def r_field_file(self, name, required=False, classes='', style=""): diff --git a/src/webapp.py b/src/webapp.py index 04fe8b1..40a515e 100644 --- a/src/webapp.py +++ b/src/webapp.py @@ -388,8 +388,8 @@ class ScriptFormWebApp(WebAppHandler): params['maxval'] = field.get("max", '') if field['type'] in ('date'): - params['min'] = field.get('min', '') - params['max'] = field.get('max', '') + params['minval'] = field.get('min', '') + params['maxval'] = field.get('max', '') if field['type'] == 'text': params['rows'] = field.get("rows", '')