The new date picker opens when you click the icon on the rig


Topic: The new date picker opens when you click the icon on the right side, not on input. how to set opens click on the input?

wenzhili pro asked 5 years ago

The new date picker opens when you click the icon on the right side, not on input. How to set opens click on the input?


Grzegorz Bujański commented 5 years ago

The new date picker only opens when you click the icon. It is not possible to change this.


lemons answered 5 years ago

$('.datepicker input').click(function(){
   $(this).parent().find('i').last().trigger('click');
});

This function should solve your issue...

https://mdbootstrap.com/snippets/jquery/lhock/1608686


wenzhili pro commented 5 years ago

Thanks, your answer is good. I had found another way. $("#datepicker2").click(function () { var from_input = $('#datepicker2').datepicker('picker'); from_input.open(); })


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.17.0
  • Device: iOS
  • Browser: iOS
  • OS: OS
  • Provided sample code: No
  • Provided link: No