[Vuejs]-How can I add a max date with VueJs in a html input?

0👍

You can bind the date that you want as max (Date typed).

For example, if you wanted to set today as max date, you should add

<input type="date"
    class="form-control" 
    :max="new Date()"
    id="exampleInputEmail1" 
    v-model="form.collection_date" 
    placeholder="Ingresa la fecha de la recaudación" 
    required>

The point is to bind the date you want as max. Note that, in date-type input, the max should be a date too.

Leave a comment