Saturday, 4 October 2014

Show only month and year in Ajax calendar extender in ASP.NET using JavaScript

In this article I will explain how to show only month and year in Ajax calendar extender in ASP.NET using JavaScript.

(Or)

Show only month and year in Ajax calendar extender in ASP.NET using JavaScript

Example :



Below is the textbox designed for showing Month & Year. Ajax Calendar Extender control is used for showing Month & Year.
 
Select Month:  <asp:TextBox ID="txtMonth" runat="server" AutoCompleteType="Disabled"></asp:TextBox>
<ajax:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" OnClientHidden="onCalendarHidden" 
 OnClientShown="onCalendarShown" Format="MM/yyyy" BehaviorID="calendar1"  TargetControlID="txtMonth">
</ajax:CalendarExtender>
 <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="txtMonth"
FilterType="Custom, Numbers" ValidChars="/" Enabled="True" />