title: Linked Fields - Bootstrap Datetimepicker
body: <p>I can not make the Linked Fields option work.
  When the event is triggered, the error below appears in the console.</p>
  
  <p>Funny that even the basic datepicker functionality works when events are active.</p>
  
  <p>JavaScript Code</p>
  
  <pre><code>jQuery(container).find(".xcrud-datepicker").each(function() {
  var element = jQuery(this);
  $(function() {
  element.datetimepicker();
  var range_start = element.data("rangestart");
  var range_end = element.data("rangeend");
  if (range_start) {
      element.datetimepicker({
      useCurrent : false
      // Important! See issue #1075
      });
  }
  if (range_end) {
      element.on("dp.changes", function(e) {
      var target = element.parent().find('input[name="' + range_end + '"]');
      jQuery(target).data("DateTimePicker").minDate(e.date);
      });
  }
  if (range_start) {
      element.on("dp.changes", function(e) {
      var target = element.parent().find('input[name="' + range_start + '"]');
      jQuery(target).data("DateTimePicker").maxDate(e.date);
      });
  }
  });
  });
  </code></pre>
  
  <p>HTML Code</p>
  
  <pre><code>&lt;div class="col-md-8 col-sm-9"&gt;
  &lt;input class="xcrud-input xcrud-datepicker form-control" data-required="1" type="text" data-type="datetime" value="" name="Y2xpZW50ZXMuY2xpX2NyaWFjYW8-" data-rangeend="WTJ4cFpXNTBaWE11WTJ4cFgyTnlhV0ZqWVc5ZmRHOC0-"&gt;
  &lt;span&gt; até &lt;/span&gt;
  &lt;input class="xcrud-input xcrud-datepicker form-control" type="text" data-type="datetime" value="" name="Y2xpZW50ZXMuY2xpX2NyaWFjYW9fdG8-" data-rangestart="WTJ4cFpXNTBaWE11WTJ4cFgyTnlhV0ZqWVc4LQ--"&gt;
  </code></pre>
  
  <p></p>
  
  <p>Error on JS console, when event is triggered</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'minDate' of undefined
  </code></pre>