good afternoon I have a question as I can do to save the format of one hour in a variable I mean I have the following function:
eventClick: function(event, jsEvent, view){
//creo un evento para extraer los datos de la base de dato y mostrarlos en el modal
var hora1=04:00:00;// almaceno dos horas que necesito comparar
var hora2=07:00:00;
//extraigo la informacion de la columna seleccionada
var date_start = $.fullCalendar.moment(event.start).format('YYYY-MM-DD');
var time_start = $.fullCalendar.moment(event.start).format('hh:mm:ss');
$time_start= $('#modal-event #_time_start').val(time_start);
//almaceno la informacion en una variable que time_start para luego compararla con las variables anterior mencionadas
$('#modal-event #delete').attr('data-id', event.id);
$('#modal-event #_title').val(event.title);
$('#modal-event #_placa').val(event.placa);
$('#modal-event #_date_start').val(date_start);
$('#modal-event #_time_start').val(time_start);
if ($time_start > hora1 && $time_start < hora2 ) {
alert('pedido invalido debe Modificar la hora');
}else{
alert('Pedido Valido');
}
console.log(time_start);
$('#modal-event').modal('show');
}
But the question is that it always takes the wrong variable not if it is the condition or is the way in which I store the time in the variable: