title: How to add number of days in a text box with MaskedEditExtender
body: <p>I want to add number of days in a date which shows in textbox using javascript on text change event. Please help me out...</p>
  
  <pre><code>&lt;tr id="AbsentDays" runat="server"&gt;
      &lt;td align="right" style="width: 33%"&gt;
          &lt;asp:Label ID="Label9" runat="server" Text="No of days"&gt;&lt;/asp:Label&gt;
      &lt;/td&gt;
      &lt;td id="Td5" runat="server"&gt;&amp;nbsp;:&amp;nbsp;
      &lt;/td&gt;
      &lt;td id="Td6" align="left" colspan="3" runat="server"&gt;
          &lt;asp:TextBox runat="server" ID="txtDayAbsent" Width="80px"
              onchange="javascript: ontextchanged();"&gt;&lt;/asp:TextBox&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  
  
  &lt;tr&gt;
  
      &lt;td align="right"&gt;
          &lt;asp:Label ID="lblDurationFrom" runat="server" Text="Duration From"&gt;&lt;/asp:Label&gt;
      &lt;/td&gt;
      &lt;td style="width: 1%;"&gt;&amp;nbsp;:&amp;nbsp;
      &lt;/td&gt;
      &lt;td style="width: 36%"&gt;
          &lt;asp:TextBox ID="txtDurationFrom" runat="server" Width="80px"&gt;&lt;/asp:TextBox&gt;
          &lt;cc1:maskededitextender id="MaskedEditExtender2" runat="server" targetcontrolid="txtDurationFrom"
              mask="99/99/9999" masktype="Date" errortooltipenabled="True" culturename="en-GB"
              cultureampmplaceholder="AM;PM" culturecurrencysymbolplaceholder="£" culturedateformat="DMY"
              culturedateplaceholder="/" culturedecimalplaceholder="." culturethousandsplaceholder=","
              culturetimeplaceholder=":" enabled="True" /&gt;
          &lt;cc1:calendarextender id="CalendarExtender1" runat="server" targetcontrolid="txtDurationFrom"
              format="dd/MM/yyyy" enabled="True" /&gt;
      &lt;/td&gt;
  
      &lt;td align="right"&gt;
          &lt;asp:Label ID="lblDurationTo" runat="server" Text="Duration To"&gt;&lt;/asp:Label&gt;
      &lt;/td&gt;
      &lt;td style="width: 1%;"&gt;&amp;nbsp;:&amp;nbsp;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;asp:TextBox ID="txtDurationTo" runat="server" Width="80px"&gt;&lt;/asp:TextBox&gt;
          &lt;cc1:maskededitextender id="MaskedEditExtender1" runat="server" targetcontrolid="txtDurationTo"
              mask="99/99/9999" masktype="Date" errortooltipenabled="True" culturename="en-GB"
              cultureampmplaceholder="AM;PM" culturecurrencysymbolplaceholder="£" culturedateformat="DMY"
              culturedateplaceholder="/" culturedecimalplaceholder="." culturethousandsplaceholder=","
              culturetimeplaceholder=":" enabled="True" /&gt;
          &lt;cc1:calendarextender id="CalendarExtender2" runat="server" targetcontrolid="txtDurationTo"
              format="dd/MM/yyyy" enabled="True" /&gt;
      &lt;/td&gt;
  
  &lt;/tr&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>function ontextchanged()
  {
      var dayAbsent = document.getElementById('&lt;%=txtDayAbsent.ClientID%&gt;').value;
      var myDate = new Date((document.getElementById('&lt;%=txtDurationTo.ClientID%&gt;')).value);
      myDate.setDate(myDate.getDate() + parseInt(dayAbsent));
  }    
  </code></pre>
  
  <p>on change event of <strong>txtDayAbsent</strong> i want to add no of days in txtDurationTo 
  nowhow to set this date to txtDurationTo text box with dd/mm/yyyy format</p>