i'm using code initialize datepicker plugin on input
$('.datepicker input').datepicker({ ... (options) }); this works fine if input present on page load, dynamically added inputs not work.
i tried doing way instead doesnt not work either.
$('body').datepicker({ selector: '.datepicker input', ... (options) }); is there way accomplish this?
found answer here: putting datepicker() on dynamically created elements - jquery/jqueryui
$('body').on('focus', '.datepicker input', function() { $(this).datepicker({ ... }); });
Comments
Post a Comment