Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Metronic Vue datepicker that works with VeeValidate / Yup


Hello,

I just bought your template and I cant figure out how can I implement el-plus datepicker with validation? Can you please provide me with a working example?


<div class="mb-5 row">
<div class="col-md-6">
<!--begin::Label-->
<label class="form-label mb-3">Name</label>
<!--end::Label-->

<!--begin::Input-->
<Field
type="text"
placeholder="xxx"
class="form-control form-control-lg form-control-solid"
name="name"
/>
<ErrorMessage
name="name"
class="fv-plugins-message-container invalid-feedback"
></ErrorMessage>
<!--end::Input-->
</div>
<div class="col-md-6">
<!--begin::Label-->
<label class="form-label mb-3">Date of Birth</label>
<!--end::Label-->

<!--begin::Input-->
[el-plus datepicker that matches style of normal Metronic fields with working ErrorMessage here]
<!--end::Input-->
</div>
</div>
<pre lang="html"></pre>


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi,

Sorry for the late reply.

Here is an example of how you can use Vee-Validate in combination with el-date-picker:

<Field name="yourFieldName" :value="defaultValue" v-slot="{ field }">
<el-date-picker
v-bind="field"
type="date"
size="default"
/>
</Field>


Regards,
Lauris Stepanovs,
Keenthemes Support Team



thanks a lot happy saved me



Hi,

Glad to hear this! Please let us know if you have any further questions on this topic or anything else.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(