-1
I’m using Moment.js with the following code, and in it is to generate the due date all month according to the selected date, but when I select today’s date, it appears written Today at 12:00 am and not 28/04/2018, how to correct this error?
for ($i = 0; $i < 12; $i++){
var minhaData = moment(ParcelaVencimento, "YYYY/M/D h:m").add('months', $i);
ParcelaVencimento1 = minhaData.calendar();
var linha = '<tr class="selected" id="linha'+cont+'"> <td> <button type="button" class="btn btn-warning" onclick="apagar('+cont+');"> X </button></td> <td> <input type="hidden" name="cont[]" value="'+cont+'">'+cont+'</td> <td> <input type="text" name="ParcelaVencimento1[]" value="'+ParcelaVencimento1+'"></td> </tr>'
Date
Today at 12:00 am
28/05/2018
28/06/2018
28/07/2018