Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Datepicker clear on form reset

Arturo Macías priority asked 7 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 7 years ago


Dear Arturo, you can access component method using ViewChild, please check following question where you will find similar exmaple https://mdbootstrap.com/support/howto-programmatically-set-the-date-in-datepicker/

FREE CONSULTATION

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

Status

Closed

Specification of the issue

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