amsul / pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
http://amsul.ca/pickadate.js
MIT License
7.7k stars 1.01k forks source link

how attach pickdate to a dynamically generated fields #1126

Open xhava opened 5 years ago

xhava commented 5 years ago

Hi, someone knows how to attach this plugin to all dynamically generated fields. i have a form with 1 default field, but there is a button to add another field. this field is generated dinamycally, for the first field it works, but for the next fields datepicker does not work.

regards

DanielRuf commented 5 years ago

See https://davidwalsh.name/detect-node-insertion and https://github.com/DanielRuf/noopener/blob/master/src/index.js for a possible solution.