[jQuery] Cycling through input element names/ids question

[jQuery] Cycling through input element names/ids question

<html>
<body>
Hello folks,
I'd appreciate some help with a jquery "translation".
I have an ajax-returned form containing an unknown number of input boxes
to which I want to use as date input fields (via UI Datepicker). 
The fields will have unique, sequential, zero-based ids and names e.g.
daterange0, daterange1, daterange2, and so on.
I need to assign datepicker to them as:
<pre>$('</pre><tt>#daterangeX</tt><pre>').datepicker();
</pre>where X is unique (0,1,2 etc)
If I knew there were going to be 5 fields in the incoming form, I'd go
something like...
<tt>for (var i=0;i<5;i++){
<x-tab>        </x-tab>
$("#daterange"+i).datepicker();

</tt>But I'll never know how many fields there will be, so that option is
out for me.
I'd appreciate someone showing me the generic jquery solution to this
type of situation.
Thanks/Bruce</body>
</html>