Hi All Plz consider about this question.I have done my all use case except this one.In my use case I need to create dynamic filter that add/ remove rows dynamically.It contains a drop down box.depending upon drop down box value you are selecting,I create dynamic TD it may be text field or drop down list.If it text field then I have to add date picker for that text field.I have done except date picker for dynamically generated text field.If your creating 100 rows the text fields name should be same for all rows.How to add datepicker for dynamically generated text field.Please any one kindly give me your valuable answers .
A:
Use JQuery Live to access the dynamically created DOM.
The you can attached the picker.
JeremySpouken
2010-03-02 17:21:27
Hi , thanks for ur valuable help.but Here in this link there is no any dynamic content creation .give some example in that plz.
Shanmugam
2010-03-02 17:35:46
+1
A:
first add a class attribute as "date" to your input or div ...
after dinamically adds text input to have to recall $('.date').datePicker() again to bind datePicker to new inputs or div
luca
2010-03-02 17:25:52
Hi Luca,thanks for ur reply.My code is,$('td:eq(2)', newRow).html('<input type="text" name="days" id="days" class="date" style="width:120px" />');$('.date').datePicker(); But it doesnot show anything plz help me what I need to do.Give me your valuable help plz.
Shanmugam
2010-03-02 17:34:03
are you using jquery ui , is it right ? if so first correct datePicker to datepicker ... i wrote datePicker before as i was writing on the fly... beside that your code looks right ...also be sure it get called (adding an alert()?)
luca
2010-03-02 21:01:51