0

Currently I am trying to bind dynamically loaded input with date-picker using,

$('body').on('focus',".datepicker_recurring_start", function(){
    $(this).datepicker();
});​

Thanks to putting datepicker() on dynamically created elements - JQuery/JQueryUI

The issue is that user need to focus before datepicker start working. Is there any load event that trigger when we inject dynamic HTML to DOM?

Imran Qadir Baksh - Baloch
  • 32,612
  • 68
  • 179
  • 322
  • I think the assumption is that the datepicker would not do anything until the element (assuming an input) received focus, so it would always appear to be working. If you wanted other behavior (such as focusing the input), I would suggest adding that trigger directly to the function that injects the content. – llessurt Feb 28 '23 at 13:56

0 Answers0