title: Binding trigger on multiple Pikoday calendar pickers
body: <p>Okay, so I have some input fields on a page. I need to add a datepicker to those. And I have to use the tiny calendar icon next to the input field itself.</p>
  
  <p>Im using Pikaday for my calendar, and one apply a trigger element. However, it doesn't seem to work. As you can see from my code below, I'm finding the relevant datepicker-button-element, and I'm using that as my trigger. </p>
  
  <p>Expected result:
  <a href="http://dbushell.github.io/Pikaday/examples/trigger.html" rel="nofollow">http://dbushell.github.io/Pikaday/examples/trigger.html</a></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="datepicker-able"&gt;
      &lt;input type="text" class="datepicker number1"&gt; 
       &lt;a href="#" class="datepicker-button"&gt;button1&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="datepicker-able"&gt;
      &lt;input type="text" class="datepicker number2"&gt; 
       &lt;span class="datepicker-button"&gt;button2&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$(document).ready(function() {
      $('.datepicker').each(function(index, element) {
          $(element).pikaday({
              field: element,
              trigger: $(element).closest('div').find('.datepicker-button').get(0), // &lt;&lt;&lt;&lt;
              firstDay: 1,
              //position: 'top right',
              minDate: new Date('1900-01-01'),
              maxDate: new Date('2015-10-15'),
              format: 'DD.MM.YYYY',
              defaultDate: new Date('1980-01-01'),
              yearRange: [1900,2020],
          });
      });
  });
  </code></pre>