diff options
Diffstat (limited to 'bh20simplewebuploader')
-rw-r--r-- | bh20simplewebuploader/main.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 34dc354..ceab8a6 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -183,7 +183,13 @@ def generate_form(schema, options): # Make a tuple for each one record['options'].append((name, value)) elif field_type == 'string': - record['type'] = 'text' # HTML input type + if field_name.endswith('date'): + # Use a date picker to generate a good string. + # Comes back YYYY-MM-DD. + record['type'] = 'date' + else: + # Normal text string + record['type'] = 'text' elif field_type == 'int': record['type'] = 'number' elif field_type == 'float': |