jQuery Datepicker Binding to Dynamic Input – A Simple Solution

jquery datepicker bind to dynamic element

jQuery date picker plugin is one of the most popular and heavily used plugins in any simple to a complex web project. It gives the user ability to select dates and times from the calendar UI it renders.

In the above form, we have a few fields like DOB and others which will have date picker control but the second box is generated with the Add More button, hence that block was not part of the page itself. And the date picker won’t work for the second field.

Let’s have a look at a typical date picker initialize code.