Closed r-yeganeh closed 4 years ago
Hi @r-yeganeh
I strongly recommend you to use validation plugins like vee-validate
<vee-observer ref="form" tag="form" @submit.native.prevent="submit">
<vee-provider v-slot="{ errors }" rules="required" name="birthday">
<date-picker v-model="form.birthday" view="year" />
<div class="text-danger" v-text="errors[0]" />
</vee-provider>
<button type="submit" v-text="'SUBMIT'" />
</vee-observer>
Hi!
How do you exactly make this lovely picker a required field? I tried the below code but it didn't work?
<jalali-picker type="datetime" format="YYYY-MM-DD HH:mm" display-format="jYYYY/jMM/jDD | YYYY-MM-DD | HH:mm" v-model="data" required> </jalali-picker>