【发布时间】:2015-01-30 06:54:32
【问题描述】:
我想制作一个程序,让您可以选择要使用的日期格式。
我不知道如何在扩展器中选择日期后更改日历扩展器的日期格式属性,具体取决于我在DropDownList1 中选择的格式。我应该使用OnClientDateSelectionChanged(),但它只在客户端运行有没有办法使用javascript更改扩展器的日期格式属性?请帮忙。
<asp:ImageButton ID="imgPopup" ImageUrl="images/calendar.png" ImageAlign="Bottom" runat="server" />
<cc1:CalendarExtender ID="Calendar1" PopupButtonID="imgPopup" runat="server" TargetControlID="txtDate">
</cc1:CalendarExtender>
<asp:DropDownList id="DropDownList1" runat="server">
<asp:ListItem value="value">
dd/MM/yyyy
</asp:ListItem>
<asp:ListItem value="value1">
MM/dd/yyyy
</asp:ListItem>
</asp:DropDownList>
【问题讨论】:
标签: c# asp.net drop-down-menu date-format calendarextender