Return next date

Return next date

antoniocibantoniocib Posts: 277Questions: 62Answers: 1

Good evening, to have today's date automatically I use this function, but to have the next day, how can I do?

    "label": "Data di Consegna:",
    "name": "delivery_na",
    "type": "datetime",
    "format": "DD/MM/YYYY",
 def: function () { return new Date(); },
},

Answers

  • antoniocibantoniocib Posts: 277Questions: 62Answers: 1

    Solved in this way.

    def: function () {
         var today = new Date();
         var tomorrow = new Date(today.getTime() + (24 * 60 * 60 * 1000));
         return tomorrow;
      },
    
Sign In or Register to comment.