title: How to merge two jQuery Datepickers
body: <p>I have two datepickers with different id and name. Can I merge them both and remove the redundant code?</p>
  
  <pre><code>     &lt;script&gt;
      jQuery(function() {
        jQuery( "#&lt;portlet:namespace/&gt;other_date" ).datepicker({
             showOn: "button",
             buttonImage: "/html/themes/control_panel/images/common/calendar.png",
             buttonImageOnly: true,
             changeMonth: true,
             changeYear: true
         });
        jQuery( "#&lt;portlet:namespace/&gt;bene_relation_birth_date").datepicker({
            showOn: "button",
            buttonImage: "/html/themes/control_panel/images/common/calendar.png",
            buttonImageOnly: true,
            changeMonth: true,
            changeYear: true
        })
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>...</p>
  
  <pre><code>&lt;input type="text" name="other_date" label="" value=""
                      id="other_date"&gt;&lt;/input&gt;
  
  
   &lt;input type="text" name="bene_relation_birth_date" label="" value=""
                      id="bene_relation_birth_date"&gt;&lt;/input&gt;
  </code></pre>