Topic: MDBDatepicker selected date does not work with custom date format
Hello,
I encountered a bug with the MDBDatepicker component, the datepicker displays the wrong date in the modal popup with a custom format.
My code:
<MDBDatepicker
v-model="picker4"
inputToggle
label="Select a date"
format="DD-MM-YYYY"
placeholder="DD-MM-YYYY"
/>
And in script setup just an empty ref:
const picker4 = ref();
Steps to reproduce:
- Select the 9th of Januari 2022 in datepicker modal
- Click on "Ok"
- Click on the input again
- The wrong date is now selected in the modal (the 1st of september is now selected)
Expected behavior
Display the right date in the modal of the datepicker with a custom date format.
Actual behavior
Displays the wrong date in the datepicker with a custom format.
Bartosz Cylwik staff answered 2 years ago
Hello, thank you for letting us know about that. We have added this bug to our list and we will fix it as soon as possible. Best Regards
Menno pro premium priority answered 2 years ago
Hi, is there any update on this issue. We are preparing for a production release and this issue is still present. Can this be fixed for MDB5 Vue v1?
Mikołaj Smoleński staff commented 2 years ago
Hi Menno,
The fix is going to be released on Monday.
Keep coding!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Vue
- MDB Version: MDB5 3.0.0
- Device: Macbook Pro M1
- Browser: Chrome
- OS: macOS Monterey
- Provided sample code: No
- Provided link: No