Topic: Clear button on date picker

Tomas HD free asked 5 years ago


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 5 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 free commented 5 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 5 years ago

Fixed dissmiss. Placeholder value should be shown after clear. It's the default behavior.

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

Resolved

Specification of the issue

  • ForumUser: 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