title: Setting jquery datepicker in modal to event start and end date (FullCalendar)
body: <p>By clicking on an event in my calendar, a modal window opens with form fields for start and end date with jquery datepicker. I can display the event dates with <code>&lt;p class=&quot;start&quot;&gt;Start At: &lt;span&gt;&lt;/span&gt;&lt;/p&gt;</code> in the modal window but I can't manage how to set the datepicker initially with these dates.</p>
  <p>If this is bad practise I would like to know how to do this better, maybe by using the controller?</p>
  <p>From my calendar config in the view:</p>
  <pre><code>      eventClick: function(info,event){
          $('#processName').html(info.event.title + &quot; (&quot; + info.event.extendedProps.eventId + &quot;)&quot;);
          $('.start').html(info.event.start);
          $('.end').html(info.event.end);
          $('#eventName').html('eventName');
          $('#editAssignmentModal').modal();
       
        },
  </code></pre>
  <p>From modal window html:</p>
  <pre><code>&lt;div class=&quot;input-group date&quot; data-provide=&quot;datepicker&quot;&gt;
      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;mymodal&quot; name=&quot;start&quot; value=&quot;&quot;&gt;
      &lt;div class=&quot;input-group-addon&quot;&gt;
          &lt;span class=&quot;glyphicon glyphicon-th&quot;&gt;&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;p class=&quot;start&quot;&gt;Start At: &lt;span&gt;&lt;/span&gt;&lt;/p&gt;
  </code></pre>