[Vuejs]-VueJS render for once in property

0👍

I suggest you to initialize the separate data value for min attribute and define its value on page load like this:

<input type="date" class="form-control" name="birth" placeholder="B.Date"
v-bind:min="min" v-model="item.birthdate" v-if="item.gender > 1" required />

new Vue({
  el: "#app",
  data: {
    item: {
        birthdate: "2001-11-12",
      gender: "2"
    },
    min: null
  },
  created() {
    this.min = this.item.birthdate
  }
})

I’ve created a fiddle for you: Fiddle

👤Igor

Leave a comment