No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Cannot validate q-datetime as required

    Framework
    1
    1
    607
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jigarzon last edited by

      Hi,
      I’m having a q-datetime inside a q-field and trying to validate it as required:

      <q-field label="Due date"
          :error="$v.entity.period_repetition_config.due_date.$error"
          errorLabel="Required!">
          <q-datetime v-model="entity.period_repetition_config.due_date"
              type="date"
              @input="$v.entity.period_repetition_config.due_date.$touch"
              @blur="$v.entity.period_repetition_config.due_date.$touch"
              format="DD/MM/YYYY" />
      </q-field>
      

      My validation config is:

        validations: {
          entity: {
            period_repetition_config: {
              due_date: {
                required
              }
            },
          }
        },
      

      The problem is after setting a date the field still shows the required error label.
      Thanks!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post