Sum date in a form field

Asked

Viewed 24 times

0

I need to get the date sum from the integer number indicated in the form field, and display it in the second date field in a process form.

inserir a descrição da imagem aqui

I tried the following:

var dias = Form.fields("DIAS").value();
var dataAtual = new Date();

Form.fields("DATA").value(dataAtual.getDate() + dias);

Form.apply();

But the result is this:

inserir a descrição da imagem aqui

What is the correct function to get the value of the first field and add the date and display in the second field?

  • Please clarify your problem or provide additional details in order to highlight exactly what you need. The way it’s written these days it’s hard to tell exactly what you’re asking.

  • This can also be useful: Add 1 day to a date

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.