Commit 59dfbd2860ac457a72547254bc8ecb132ffcbb78
1 parent
803e9f27
Exists in
master
and in
5 other branches
Date picker in register forms #14
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
core/templates/register_user.html
... | ... | @@ -41,7 +41,8 @@ |
41 | 41 | {% endif %} |
42 | 42 | <div class="col-md-8"> |
43 | 43 | {% if field.auto_id == 'id_birth_date' %} |
44 | - {% render_field field class='form-control input-sm' type='date' %} | |
44 | + {% render_field field class='form-control input-sm date-picker' %} | |
45 | + | |
45 | 46 | <span id="helpBlock" class="help-block">{{ field.help_text }}</span> |
46 | 47 | {% elif field.auto_id == 'id_image' %} |
47 | 48 | {% render_field field class='form-control input-sm' %} | ... | ... |
users/templates/users/create.html
... | ... | @@ -38,7 +38,8 @@ |
38 | 38 | {% else %} |
39 | 39 | <label for="{{ field.auto_id }}">{{ field.label }}</label> |
40 | 40 | {% endif %} |
41 | - <input type="date" class="form-control"name="{{field.name}}" value="{% if field.value.year %}{{field.value|date:'Y-m-d'}}{% else %}{{field.value}}{% endif %}"> | |
41 | + <input type="text" class="form-control input-sm date-picker" name="{{field.name}}" min="{{now|date:'d-m-Y'}}"> | |
42 | + | |
42 | 43 | {% elif field.auto_id == 'id_image' %} |
43 | 44 | {% if field.field.required %} |
44 | 45 | <label for="{{ field.auto_id }}">{{ field.label }}<span>*</span></label> | ... | ... |