D
D
Dima2020-06-21 10:42:04
Vue.js
Dima, 2020-06-21 10:42:04

How to validate date from standard datepicker on Vuelidate?

If you know the answer to the question, you don’t have to read further, but just write the answer)

there is a regular datepicker and you need to organize a check through Vuelidate. or you can not through it, but so that the information about the validation performed or not is transmitted to Vuelidate. It is necessary that it was impossible to select further than the current date and at least 5 years before the current date. i.e. so that you can select a maximum of 21 06 2015. the datepicker returns info in the format 06/21/2020
some options that I tried
1) convert to milliseconds, but then I can’t update the info in vuelidate from methods
2) compose such a format in the validator as it gives datepicker but then does not correctly validate.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question