vendredi 3 juillet 2020

My javascript date picker restriction works fine in android and desktop but on ios safari does not

My datepicker field should not let you select the current day, I mean the today day. My javascript code works fine on android and desktop but ios safari does not.

here is my HTML

  <div class="item">
      <p>Fecha de envío</p>
      <input type="date" placeholder="yyyy-mm-dd" class="form-control input-min-width-95p" 
      name="fecha" id="fecha" required/>  
      <i class="fas fa-calendar-alt"></i>
    </div>

here is my javascript

 const minValue = new Date();
 minValue.setDate(minValue.getDate() + 1);
 document.getElementById('fecha').min = minValue.toISOString().split("T")[0];

In the iphone the calendar let me choose the today day and only appears the message "please enter a value greater than or equal to 2020-07-04" I just want the calendar don't allow to pick the date on the calendar.

Thanks




Aucun commentaire:

Enregistrer un commentaire