darrenfang / vuetify-datetime-picker

DatetimePicker component for Vuetify.js. https://darrenfang.github.io/vuetify-datetime-picker/
MIT License
175 stars 127 forks source link

Example code in the Readme when using with Validation #67

Open RinMinase opened 4 years ago

RinMinase commented 4 years ago

There doesn't seem to be any documentation with regards to using this library with validations.

forgivegod commented 4 years ago

Dont need it, Vuetify has you covered. you will wanna use the text-field-props attribute tho

<validation-provider v-slot="{ errors }" name="SomeName" rules="required|max:10">
  <v-datetime-picker v-model="datetime"
    :text-field-props="{
      errorMessages: errors,
      outlined:true,
      class:'custom-label-color',
      prependIcon:'mdi-clock-start',
    }"
  />
</validation-provider>

To get the above working see the Vuetify doc examples for vee-validate here: https://vuetifyjs.com/en/components/forms/#vee-validate

RinMinase commented 4 years ago

I see. But, shouldn't this be included in the readme or something for those wanting to look on how to implement this? 🤔

forgivegod commented 4 years ago

@RinMinase Putting it that way, I agree. I'm sure the author wouldn't mind a pull request that updates the examples.