How to add minutes to a time in a datetime-local input?

0

I am copying the value of a datetime-local input (date_ini) to another one once the user types in the first one (date_ter). However I would like to be able to add 20 more minutes to the result in the second input (date_ter) How could I do it?

$("#fecha_ini").keyup(function(){

   var value = $(this).val();
   $("#fecha_ter").val(value);


});
    
asked by CristianOx21 20.10.2017 в 17:58
source

1 answer

0

With the .setMinutes () function you can do it without any problem

$("#fecha_ini").keyup(function(){

   var value = $(this).val();
   $("#fecha_ter").val(value.AddMinutes(20));
});
    
answered by 20.10.2017 в 18:03