Customize the step value and hide spin buttons in Vue Numerictextbox component
11 Jun 20242 minutes to read
The spin buttons allow you to increase or decrease the value with the predefined step
value. The visibility of spin buttons can be set using theshowSpinButton
property.
<template>
<div id="app">
<div class='wrap'>
<ejs-numerictextbox id="numeric" :showSpinButton='false' :value="value" :step="step" :min="min" :max="max"></ejs-numerictextbox>
</div>
</div>
</template>
<script setup>
import { NumericTextBoxComponent as EjsNumerictextbox } from "@syncfusion/ej2-vue-inputs";
const step = 2;
const min = 10;
const max = 100;
const value = 16;
</script>
<style>
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-inputs/styles/material.css";
.wrap {
margin: 0 auto;
width: 240px;
padding-top: 100px;
}
</style>
<template>
<div id="app">
<div class='wrap'>
<ejs-numerictextbox id="numeric" :showSpinButton='false' :value="value" :step="step" :min="min"
:max="max"></ejs-numerictextbox>
</div>
</div>
</template>
<script>
import { NumericTextBoxComponent } from "@syncfusion/ej2-vue-inputs";
export default {
name: "App",
components: {
"ejs-numerictextbox": NumericTextBoxComponent
},
data() {
return {
step: 2,
min: 10,
max: 100,
value: 16
}
}
}
</script>
<style>
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-inputs/styles/material.css";
.wrap {
margin: 0 auto;
width: 240px;
padding-top: 100px;
}
</style>