How can I validate, using VeeValidate v3 and VueJs-DatePicker, if a date is before or after a certain date?
I am using: https://www.npmjs.com/package/vuejs-datepicker (latest) and https://baianat.github.io/vee-validate/ (Version 3, not 2)
VeeValidate removed its date validation capabilities, stating that the rules were fragile, didn't work great, etc.
So I am assuming I need to create custom rules but I don't really know where to start with this and could use help.
I am using the VueJS-DatePicker package as a datepicker and I am using a custom format via the "format" attribute.
My datepicker code
<datepicker
v-model="inputVal"
:class="{ 'has-errors': !!errors[0] }"
:placeholder="placeholder"
calendar-button
calendar-button-icon="fal fa-calendar-alt"
bootstrapStyling
:typeable="true"
:disabled-dates="disabledDates"
:format="customFormatter"
></datepicker>
Using Moment to format the date
customFormatter(date) {
return moment(date).format('MM/DD/YYYY');
},