Topic: MDBDatepicker not clearing when v-model is set to an empty string
Expected behavior: When I set the date v-model back to an empty string using the removeDate() function, the MDBDatepicker should clear so it is ready for something else to be entered.
Actual behavior: When I set the date v-model back to an empty string using the removeDate() function, the MDBDatepicker stays populated with the previous date, even though the v-model is an empty string.
Resources (screenshots, code snippets etc.)
<template>
<div>Current v-model: {{date}}</div>
<MDBDatepicker
v-model="date"
label="DatePicker"
/>
<MDBBtn @click="removeDate">Remove date</MDBBtn>
</template>
<script setup>
import { ref } from 'vue'
import { MDBDatepicker, MDBBtn } from 'mdb-vue-ui-kit'
const date = ref('')
const removeDate = () => {
date.value = ''
}
</script>
Bartosz Cylwik staff answered 1 year ago
Hi! Thanks for letting us know. I have added this to our list to check what is going on. Best Regards!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Vue
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No