Topic: Clear button on date picker
In vue's documentation, the datepicker has three buttons on the bottom. How can I add a clear button?
Mikołaj Smoleński staff answered 6 years ago
Hi Tomas,
I've add this option to our development branch. To apply it, please update mdbvue dependency like this:
"mdbvue": git+https://oauth2:YOUR_TOKEN@git.mdbootstrap.com/mdb/vue/vu-pro.git#dev"
also Your DatePicker options should look like this:
buttons: {
ok: 'Ok',
cancel: 'Cancel',
clear: 'Clear'
}
Best regards
Tomas HD commented 6 years ago
Thanks, it worked! But is it possible to override the clear function? Because it would be nice to dismiss the datepicker modal when clear button is clicked and also, instead of writing the placeholder text, use a empty string.
Mikołaj Smoleński staff commented 6 years ago
Fixed dissmiss. Placeholder value should be shown after clear. It's the default behavior.
Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Free
- Premium support: No
- Technology: MDB Vue
- MDB Version: 5.1.0
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No