Hello
I need to get the value of my InvoiceDate and then add 1 month to it and display it in the input box DueDate formatted as mm/dd/yyyy.
This is not working out for me. Could someone please tell me what I have done wrong.
Code below:
<tr>
<td class="InvoiceStdTextBold">
Invoice Date:
</td>
<td class="InvoiceStdText">
<input class="TableNoBorder" type="text" name="InvoiceDate" value=%%PurchaseDate, {0:d}%%>
</td>
</tr>
<tr>
<td class="InvoiceStdTextBold">
Due Date:
</td>
<td class="InvoiceStdText">
<script language="JavaScript">
function GetDueDate()
{
var dInvoiceDate = document.Form1.InvoiceDate.value;
var myDate = new Date(dInvoiceDate);
myDate.setMonth(myDate.getMonth() + 1);
document.Form1.DueDate.Value = mydate;
}
</script>
<input class="TableNoBorder" type="text" name="DueDate">
</td>
</tr>
I need to get the value of my InvoiceDate and then add 1 month to it and display it in the input box DueDate formatted as mm/dd/yyyy.
This is not working out for me. Could someone please tell me what I have done wrong.
Code below:
<tr>
<td class="InvoiceStdTextBold">
Invoice Date:
</td>
<td class="InvoiceStdText">
<input class="TableNoBorder" type="text" name="InvoiceDate" value=%%PurchaseDate, {0:d}%%>
</td>
</tr>
<tr>
<td class="InvoiceStdTextBold">
Due Date:
</td>
<td class="InvoiceStdText">
<script language="JavaScript">
function GetDueDate()
{
var dInvoiceDate = document.Form1.InvoiceDate.value;
var myDate = new Date(dInvoiceDate);
myDate.setMonth(myDate.getMonth() + 1);
document.Form1.DueDate.Value = mydate;
}
</script>
<input class="TableNoBorder" type="text" name="DueDate">
</td>
</tr>