use regular WTForms DateField for requests dates
This commit is contained in:
10
templates/components/date_input.html
Normal file
10
templates/components/date_input.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{% from "components/text_input.html" import TextInput %}
|
||||
|
||||
{% macro DateInput(field, tooltip='', placeholder='', validation='anything', paragraph=False) -%}
|
||||
{% if field.data %}
|
||||
{% set input_value=field.data.strftime("%m/%d/%Y") %}
|
||||
{% else %}
|
||||
{% set input_value=None %}
|
||||
{% endif %}
|
||||
{{ TextInput(field, initial_value=input_value, tooltip=tooltip, placeholder=placeholder, validation=validation, paragraph=paragraph) }}
|
||||
{% endmacro %}
|
Reference in New Issue
Block a user