function
calculate() {
var value1 = document.getElementById('<%= txtSDate.ClientID%>').value. split("/");
var value1 = document.getElementById('<%=
var value2 = document.getElementById('<%= txtEDate.ClientID%>').value. split("/");
var getDays= new Date(value1[2], value1[1] - 1, value1[0]) //Month is 0-11 in JavaScript
today = new Date(value2[2], value2[1] - 1, value2[0])
//Get 1 day in milliseconds
var one_day = 1000 * 60 * 60 * 24
//Calculate difference btw the two dates, and convert to days
var getDays= new Date(value1[2], value1[1] - 1, value1[0]) //Month is 0-11 in JavaScript
today = new Date(value2[2], value2[1] - 1, value2[0])
//Get 1 day in milliseconds
var one_day = 1000 * 60 * 60 * 24
//Calculate difference btw the two dates, and convert to days
document.getElementById('<%=
" days !");
}
<asp:TextBox
ID="txtSDate" runat="server" Enabled="false"></asp:TextBox>
<asp:TextBox
ID="txtEDate" runat="server" onkeyup="calculate();" Enabled="false"></asp:TextBox>
<asp:TextBox
ID=" txtnoofdays" runat="server" Enabled="false"></asp:TextBox>
No comments:
Post a Comment
Comments