Topic: Datepicker - Selecting date on calendar triggers form submission

fkmccallion free asked 4 years ago


when selecting a date on the datepicker it sets the input value. Instead, I would like the date selection to set the input value and trigger the form submission.


Marcin Luczak staff answered 4 years ago


Hi,

You can achieve that by adding an event listener to the datepicker listening to its change event with submit form callback. Please check the snippet below: https://mdbootstrap.com/snippets/jquery/marcin-luczak/2613336

Regards, Marcin


fkmccallion free commented 4 years ago

Thanks for your help Marcin! I guess I was thinking that you had a custom method for this but the standard change event works perfectly well. Again, thanks for your quick response!



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 jQuery
  • MDB Version: 4.19.1
  • Device: mac
  • Browser: chrome
  • OS: mohave
  • Provided sample code: No
  • Provided link: No