Answers for "add 1 day get current date in javascript"

5

js date add 1 day

let date = new Date();
// add a day
date.setDate(date.getDate() + 1);
Posted by: Guest on June-08-2020
2

add 1 year to current date javascript

// [SOLVED]  var date  = new Date(year + 1, month, day);

$('#membership_start').on('dp.change', function(e){
   console.log(e.date);

   var year  = new Date(e.date).getFullYear();
   var month = new Date(e.date).getMonth();
   var day   = new Date(e.date).getDate();
   var date  = new Date(year + 1, month, day);
   $('#membership_end').data("DateTimePicker").date(date);
 });
Posted by: Guest on November-06-2020

Code answers related to "add 1 day get current date in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language