Topic: Datepicker reset
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?
mlazaru staff answered 2 years 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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: 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
dagaey commented 2 years 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?