Topic: MDBDatepicker not clearing when v-model is set to an empty string

LHanny priority asked 10 months ago


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 10 months ago


Hi! Thanks for letting us know. I have added this to our list to check what is going on. Best Regards!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No