title: How to get the above input value when changing another input
body: <p>I have two inputs those are bootstrap time pickers from time and to time, when i change the end time i need to get the start time.</p>
  
  <p>Here from time and to time will be there in one row for the first time and next onwards when click on add new destination those will be dynamically append to the first row </p>
  
  <p><a href="https://i.stack.imgur.com/DeKfn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DeKfn.png" alt="enter image description here"></a></p>
  
  <p>Here I have to get the From Time and To Time when i change the To Time</p>
  
  <p>I have tried below </p>
  
  <pre><code>$(document).on('change','.departure_time_picker',function(){
  
    var departure_time  = $(this).val();
    var arrival_time    = $(this).prev().find('input.arrival_time_picker');
    console.log(arrival_time);
  }); 
  </code></pre>
  
  <p>My inputs are </p>
  
  <pre><code>&lt;div class="col-md-3" style="padding-left:5px;padding-right:5px;"&gt;
     &lt;label&gt;From Time&lt;/label&gt;
     &lt;div class="form-group"&gt;
        &lt;div class="input-group bootstrap-timepicker timepicker arrival_time"&gt;
             &lt;input name="wayPoints[0][arrival_time]" type="text" class="form-control input-small arrival_time_picker"&gt;
             &lt;span class="input-group-addon"&gt;&lt;i class="glyphicon glyphicon-time"&gt;&lt;/i&gt;&lt;/span&gt;
        &lt;/div&gt;
     &lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="col-md-3" style="padding-left:5px;padding-right:5px;"&gt;
       &lt;label&gt;To Time&lt;/label&gt;
       &lt;div class="form-group"&gt;
          &lt;div class="input-group bootstrap-timepicker timepicker departure_time"&gt;
               &lt;input name="wayPoints[0][departure_time]" type="text" class="form-control input-small departure_time_picker"&gt;
               &lt;span class="input-group-addon"&gt;&lt;i class="glyphicon glyphicon-time"&gt;&lt;/i&gt;&lt;/span&gt;
          &lt;/div&gt;
       &lt;/div&gt;
    &lt;/div&gt;   
  </code></pre>
  
  <p>When i'm trying to get the Start Time when changing the To Time im getting as 'undefined'.
  Please suggest me where i'm doing wrong.</p>