Set a max date attribute for date input fields to prevent/discourage them going over 4 characters (client side validation)

This commit is contained in:
Marcus Hill
2022-12-17 18:03:53 +00:00
parent 016d666dda
commit 51792a1a2f
50 changed files with 75 additions and 75 deletions

View File

@@ -11,12 +11,12 @@
<div class="modal-body bg-white">
<div class="form-group">
<label>Date From</label>
<input type="date" class="form-control" name="date_from" value="<?php echo $dtf; ?>">
<input type="date" class="form-control" name="date_from" max="2999-12-31" value="<?php echo $dtf; ?>">
</div>
<div class="form-group">
<label>Date To</label>
<input type="date" class="form-control" name="date_to" value="<?php echo $dtt; ?>">
<input type="date" class="form-control" name="date_to" max="2999-12-31" value="<?php echo $dtt; ?>">
</div>
</div>