Thursday, November 18

Datepicker with Dynamic Fields

Previously, I added rows to an input table. I realised later, the datepicker fields I added didn't work on these dynamic fields. Looking at the form details with the firefox web developer toolbar, I noticed the original datepicker fields had an id assigned to them of dp+randomnumber, but the new ones didn't.

I added a single line to my row adding function that solved this.
$('.datepicker').not('.hasDatePicker').datepicker();

No comments: