jdewit/bootstrap-timepicker

hide event not triggering on hide

Opened this issue · 0 comments

$(".timepicker1").timepicker({
showInputs: false,
minuteStep:1
}).on('hide.timepicker', function(e) {
//console.log('The time is ' + e.time.value);
//alert('here1');
$('#appointment_end_time').val(e.time.value);
console.log(e.time.value);
$(".timepicker1").removeData("previousValue");
$('#addNewReservationForm').validate().element('.timepicker1');

                if($(".timepicker1").valid())
                {
                    $('.timepicker1').removeClass('invalid').addClass('success');
                }

            }

        

    });

Every time is changed and focus out then widge closes but validation does not get triggered.it triggred only after rechanging time input next time