Topic: MDBDateTimePicker v-model not reactive
Expected behavior When DateTImePicker v-model is updated programmatically, the value is updated within the component.
Actual behavior When DateTImePicker v-model is updated programmatically, the value is NOT updated within the component.
Resources (screenshots, code snippets etc.)
<template>
<div>Current v-model: {{dateTime}}</div>
<MDBDateTimePicker
v-model="dateTime"
label="DatePicker"
/>
<MDBBtn @click="addDateTime">Add dateTime</MDBBtn>
<MDBBtn @click="removeDateTime">Remove dateTime</MDBBtn>
</template>
<script setup>
import { ref } from '@vue/reactivity'
import { MDBDateTimePicker, MDBBtn } from 'mdb-vue-ui-kit'
const dateTime = ref('')
const addDateTime = () => {
dateTime.value = '17/08/2022, 05:30 AM'
}
const removeDateTime = () => {
dateTime.value = ''
}
</script>
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Opened
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: MDB Vue
- MDB Version: MDB5 2.0.0
- Device: Macbook Pro 2021
- Browser: Chrome
- OS: MacOS Monterey
- Provided sample code: No
- Provided link: No
Mikołaj Smoleński staff commented 2 years ago
Thanks for posting feature request. We will be implementing this in the near future.
Keep coding!
NoahConn pro commented 2 years ago
I would also like to be able to change the format of the date like I can with MDBDatepicker.
Mikołaj Smoleński staff commented 2 years ago
Ok, noticed. Thanks