Open ghuser123 opened 4 years ago
For what its worth, seeing that this issue has been here since last year. I've had the same issue. Here's how you set up the markup so that datepicker validates using vee-validate
<ValidationObserver tag="div" ref="observer" v-slot="{ passes }">
<ValidationProvider rules="required" v-slot="{ classes, errors }">
<b-form v-on:submit.prevent="passes(onSubmit)" novalidate>
<b-form-group description class="group" :class="classes">
<v-datepicker v-model="planData.brokerOfRecordAsOf" :typeable="true" name="datepicker" input-class="form-control" required>
<label slot="afterDateInput">Broker Record as of</label>
<i slot="afterDateInput" class="fas fa-calendar-alt"></i>
<b-form-invalid-feedback slot="afterDateInput">{{ errors[0] }}</b-form-invalid-feedback>
</v-datepicker>
</b-form-group>
</form>
</ValidationProvider>
</ValidationObserver>
notice where I'm using the "classes" property. The classes to be applied depending on the state of the input.
In my Laravel+Vue.js SPA ( Single Page Application) I am using the datepicker package , BootstrapVue and Veevalidate 3.
I think I need to show only the code inside my component file as only the datepicker component causes the problem and not other ones. My code follows in EditProfile.vue:
`