答案 0 :(得分:0)
Obout有一个非常棒的库,包含AJAX Calendar控件。
答案 1 :(得分:0)
<script type="text/javascript" language="javascript">
function onlybackbutton(id) {
if (id == 1) {
document.getElementById('<%=txtCdatefrom.ClientID%>').value = "";
document.getElementById('<%=imgdatefrom.ClientID%>').click();
}
else if (id == 2) {
document.getElementById('<%=txtCdateTo.ClientID%>').value = "";
document.getElementById('<%=imgdateto.ClientID%>').click();
}
return false;
}
</script>
<table>
<tr>
<td>
Created Date From
</td>
<td>
<asp:TextBox ID="txtCdatefrom" runat="server" Width="180px" onpaste="return false;" onmousedown="return onlybackbutton(1);" onkeypress="return onlybackbutton(1);"></asp:TextBox>
<asp:ImageButton ID="imgdatefrom" runat="server" ImageUrl="~/images/DatePicker.gif"
ImageAlign="Baseline" Height="16px" />
<asp:CalendarExtender ID="calsearchdtfrm" runat="server" Enabled="True" TargetControlID="txtCdatefrom"
Format="yyyy/MM/dd" PopupButtonID="imgdatefrom">
</asp:CalendarExtender>
</td>
<td>
Created Date To
</td>
<td>
<asp:TextBox ID="txtCdateTo" runat="server" Width="180px" onpaste="return false;" onmousedown="return onlybackbutton(2);" onkeypress="return onlybackbutton(2);"></asp:TextBox>
<asp:ImageButton ID="imgdateto" runat="server" Height="16px" ImageUrl="~/images/DatePicker.gif" />
<asp:CalendarExtender ID="txtsearchdtto_CalendarExtender" runat="server" Enabled="True"
TargetControlID="txtCdateTo" Format="yyyy/MM/dd" PopupButtonID="imgdateto">
</asp:CalendarExtender>
</td>
</tr></table>