Topic: Datepicker clear on form reset

Arturo Macías priority asked 6 years ago

Hi all, i'm using Angular datepicker in a form. When form is submitted,  i reset the form and all fields return to initial state except datepicker. I have looked at datepicker.component.ts and there is a datepicker method called clearDate but i don't know how to invoke it when form is submitted. Any Idea? thanks!

Dawid Adach pro answered 6 years ago

Dear Arturo, you can access component method using ViewChild, please check following question where you will find similar exmaple


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



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No