Datepicker array


#1

I have a from that will require multiple dates and or times.

I am using the jquery datepicker that I have been using for a long
time.

I am doing this in a partial for multiple date/times:

<%= text_field_tag "mopdate[]",nil, :size => "14" %> <%= text_field_tag "start_time[]",nil, :size => "14", :value => "00:01"%> <%= text_field_tag "end_time[]",nil, :size => "14", :value => "05:00" %> <%= text_field_tag "roll_back_time[]",nil, :size => "14", :value => "04:00" %>

I have this for the initialize method:
jQuery(document).ready(function($){
$(’#mopdate[]’).datepicker({ dateFormat: ‘yy-mm-dd’ });
$(’#start_time[]’).timePicker({step: 15, startTime: “00:01”, endTime:
“05:00”, columns: 5})
$(’#end_time[]’).timePicker({step: 15, startTime: “00:01”, endTime:
“05:00”, columns: 5})
$(’#roll_back_time[]’).timePicker({step: 15, startTime: “00:01”,
endTime: “05:00”, columns: 5})
});

None of em appear to work.

Is there a way to get something like this to work?


#2

OH, it is a FORM, doh. Also the partial may be rendered multiple
times.