views:

82

answers:

1

Hi

I have a struts form that contains many input fields generated using indexed properties. As a result the id of my form elements are indexprop[0].date, indexprop[1].date etc.

Does anyone have any idea how i could assign a jquery datepicker to each of these input fields?

Thanks Damien

+1  A: 

I don't know exactly what you mean, but this could be a start:

$("input[id$=.date]").datepicker( ... )
Philippe Leybaert
Philippe, your a legend. that worked very nicely.I used it on the name attribute instead of id but it works very neatly.$('input[name$=.endDateFormatted]')Thansk for helping me with this solution
Damo