Hi,
I’m using Moment.js and Element UI and pug <template lang="pug">
I want to achieve “counter” for time (add 1 hour to currentTime). el-input-number(v-model="value" controls-position="right" @change="handleChange" :min="Number(currentTime)" :max="Number(currentTime + hours)")
Now, is displaying time in long term as pic.
There is any way to achieve this effect?
This is my whole component with data: Link to codepen.
In your example you are using an el-input-number, which is meant to display a range of numbers. As you are setting the minimum value to Number(new Date()) you’re left with a timestamp. If you want the timestamp to be one hour in the future, declare a data property like so: