0

I want to make a program that allows you to choose what date format will you want to use. I don't have an idea how to change the date format property of calendar extender after picking date in extender depending on the format I chose in my DropDownList1. should I use OnClientDateSelectionChanged() but it only run in client is there a way to change date format property of extender using javascript? please help.

<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>

1 Answer 1

0

Try this code to change templates. It works for me.

<ajax:CalendarExtender ID="CEtxtFromDueDate" runat="server" Enabled="True"  
 CssClass="cal_Theme1" Format="dd/MM/yyyy" PopupButtonID="txtFromDueDate" 
 TargetControlID="txtFromDueDate">
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.