title: How to get time value from jquery timepicker.?
body: <p>I am trying to get values from i select time in my time picker but so far I am not getting any values in return and not even in my html timepicker input showing any value inside, </p>
  
  <p>I tried some methods but not successful yet,</p>
  
  <p><strong>Method 1:</strong> </p>
  
  <pre><code>$('#datetimepicker4').on('selectTime', function() {
      var time = $('#datetimepicker4').timepicker('getTime');
      alert(time);
      // this will be a Date object that includes the time
  });
  </code></pre>
  
  <p><strong>Method 2:</strong> </p>
  
  <pre><code>$("#datetimepicker4").on('change paste keyup', function(){
      var time = $(this).val();
      alert(time);
      var getTime = time.split(":"); //split time by colon
      var hours = parseInt(getTime[0])+2; //add two hours
      //set new time
      var newTime = hours+":"+getTime[1];
      //set time picker
      $("#datetimepicker5").timepicker('option',{'minTime': newTime});
  });
  </code></pre>
  
  <p>I am debugging by try alert even not getting alert so my both functions are not working that means, even no console error relate to time pickers for selection I found, I want to be able to set min time 3 hours for current time.</p>