jQuery Datepicker does not work in dynamic element

August 5, 2014

This always happen when bind the event initially, the new field doesn’t exist. A better way is initialize the datepicker for the field when create the element. Example after an AJAX call to build the fields: