From 271ce981fdbff868c5e64c5ee1689a68c1e61350 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Sat, 4 Jul 2015 16:41:00 +0200 Subject: [PATCH] min/max => minval/maxval for date field. --- src/formrender.py | 6 +++--- src/webapp.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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", '')