'Datepicker allow blank date submission
I'm using datepicker with Django:
<form method="POST" action="{% url 'approval_date_action_modal' cpname=full_id %}"> {% csrf_token %}
<div class="input-group date" id='grm_date' data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-title="Approval Date" data-date-autoclose="true" data-date-end-date="0d" data-date-start-date="2018-11-14">
{{ approval_form.approval_date }}
<div class="input-group-addon">
<span class="material-icons md-12">date_range</span>
</div>
</div>
<br/>
<input class="btn btn-primary" type="submit" value="Confirm" />
</form>
when users clear the date and try to submit a blank date which corresponds to null in database, a warning "Please fill out this field" will pop up and cancel the submission.
Is there a simple way we can allow submission of a blank date in addition to the normal date of the stated format?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
