jquery use a datepicker on more pages
<p>I have this in my javascript file:</p>

<pre><code>$("#birthdate").datepicker({
            changeMonth: true,
            changeYear: true,
            altFormat: 'dd-mm-yy',
            altField: '#birthdate',

             });
</code></pre>

<p>I have various pages which have fields that need a datepicker. Sometimes even more then one datepicker on a page. How can I be sure that this is also going to work for a field that has for example class name "alternateDate"?</p>

<p>I tried </p>

<pre><code> $("#birthdate #alternateDate").datepicker({
</code></pre>

<p>But that's not going to work. </p>

<p>Any idea's?</p>

<p><strong>Update:</strong></p>

<p>Hmm still got a problem with the date format.</p>

<pre><code>$.datepicker.formatDate('dd-mm-yy');
            $(".datepicker").datepicker({
                changeMonth: true,
                changeYear: true,
             });
</code></pre>

<p>Here is my html</p>

<pre><code>&lt;label for="geboortedatum"&gt;Geboortedatum &lt;em&gt;*&lt;/em&gt;&lt;/label&gt;&lt;br/&gt;&lt;input type="text" class="datepicker" id="birthdate" name="birthdate" value="{$birthdate}"&gt;&lt;br/&gt;
</code></pre>

<p>But the format in the datepicker input field is still shown as 04/01/2009</p>

<p>meaning mm/dd/yy</p>

<p>Any idea's?</p>
