Answer the question
In order to leave comments, you need to log in
Is it possible to use v-model analog to set max, min in input type="range"?
Hello, I can use
<input type="range" v-model="liters" />
and describe liters in data
data() {
return {
liters: 0,
litersMin: 0,
litersMax: 100,
};
},
but how do i bind also min and max value in range - so they are also reactive
Answer the question
In order to leave comments, you need to log in
<template>
<input type="range" v-bind:min="litersMin" v-bind:max="litersMax" v-model="liters" />
</template>
<script>
export default {
data() {
return {
liters: 0,
litersMin: 0,
litersMax: 100
}
}
}
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question