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
- [Vuejs]-Bootstrap, popper.js and vue.js
- [Vuejs]-User authentication with Devise-jwt in Ruby On Rails as backend and Vuejs as frontend
Source:stackexchange.com