diff options
author | Adam Novak | 2020-04-20 11:52:47 -0700 |
---|---|---|
committer | Adam Novak | 2020-04-20 11:52:47 -0700 |
commit | f38b9c6f22b82327df9648938a5a4bcf863d8c41 (patch) | |
tree | 67009c33930672085bfc2a6f857b202fb0b4973e /bh20simplewebuploader/main.py | |
parent | 3bd4ac02ded5af9a666ad7e99ebf6891bc339636 (diff) | |
download | bh20-seq-resource-f38b9c6f22b82327df9648938a5a4bcf863d8c41.tar.gz bh20-seq-resource-f38b9c6f22b82327df9648938a5a4bcf863d8c41.tar.lz bh20-seq-resource-f38b9c6f22b82327df9648938a5a4bcf863d8c41.zip |
Use a date picker for any string 'date'
Diffstat (limited to 'bh20simplewebuploader/main.py')
-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': |