Topic: Timepicker not reactive
zitoig priority asked 3 years ago
Expected behavior
I would expect that the time picker rerenders, after changing the value of the v-model. But it is not reactive and shows still the initial value (08:00)
Resources (screenshots, code snippets etc.)
<template>
<MDBTimepicker label="Select a time" v-model="picker" :hoursFormat="24" />
<MDBInput label="input" v-model="picker"/>
</template>
<script>
import { MDBTimepicker, MDBInput } from 'mdb-vue-ui-kit';
import { ref } from 'vue';
export default {
components: {
MDBTimepicker,
MDBInput,
},
setup() {
const picker = ref('08:00');
setTimeout(() => {
picker.value = '12:00';
}, 2000);
return {
picker,
};
},
};
</script>
Marcin Luczak staff answered 3 years ago
Hi,
Timepicker was designed to allow users to only initialize it with the default date, without the ability to rerender it on v-model change. As it seems like a valuable functionality to have I've added this as a feature-request task and the team shall decide when to implement it into the release.
Keep coding, Marcin
Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Closed
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Vue
- MDB Version: MDB5 1.0.0-beta6
- Device: PC
- Browser: Chrome
- OS: win
- Provided sample code: No
- Provided link: No