dagaey free asked 1 year ago

When a datepicker has an initial value and then the value is set to empty ('') using javascript, for some reason the label stays on the top border instead of on the input field itself?

dagaey free commented 1 year ago

This is a problem not just in datepicker but also in regular text input fields.

Is there a way to "force" reset the label of fields so they will not appear on the top border?

Mateusz Lazaru staff answered 1 year ago

When you reset the value of any MDB Input using js, you can manually remove the active class to make sure the label won't stay at the top border.

demo: https://mdbootstrap.com/snippets/standard/mlazaru/5235700#js-tab-view

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 6.2.0
  • Device: desktop
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No