Calculate due date

Calculate due date

Hello,

I have a date field which is the invoice date.
Now I a user must have selected the amount of days before payment.

I would like the due date to be based on:

input.Due_date = input.Invoice_date + days;

This doesn't work. Does anyone has a solution?