<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> <div class="box-body"> <dl class="dl-horizontal"> <dt style="text-align:left"> <label for="StartDate">Start Date</label> </dt> <dd style="text-align:left" > <asp:TextBox ID="txtDate" onkeypress="copyText()" Width="200px" runat="server" ReadOnly="true" Height="34px"></asp:TextBox> </dd> <dt style="text-align:left"> <label for="StartDate">Expired Date</label> </dt> <dd style="text-align:left"> <asp:TextBox ID="txtdate2" ReadOnly="true" Width="200px" Height="34px" runat="server"></asp:TextBox> </dd> </dl> </div> <script type="text/javascript"> $(function () { $("[id*=txtDate]").datepicker({ showOn: 'button', buttonImageOnly: true, buttonImage: '/Images/calendar.png', }); $(".ui-datepicker-trigger").css("margin-bottom", "2px"); }); </script> <script type="text/javascript"> $(function () { $("[id*=txtdate2]").datepicker({ showOn: 'button', buttonImageOnly: true, buttonImage: '/Images/calendar.png', }); $(".ui-datepicker-trigger").css("margin-bottom", "2px"); }); </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type="text/javascript"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script> <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="Stylesheet" type="text/css" /> <script type="text/javascript"> function copyText() { var givenvalue = document.getElementById("<%=txtDate.ClientID%>"); var displayvalue = document.getElementById("<%=txtdate2.ClientID%>"); var settedvalue = givenvalue; displayvalue.value = settedvalue.value; } </script> </asp:Content>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)