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?
                      
                      lemons
                      free
                        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(); })
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: 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
 
Grzegorz Bujański free commented 5 years ago
The new date picker only opens when you click the icon. It is not possible to change this.