X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

ASP.NET IsOtherMonth Property


CalendarDay Control Reference Complete CalendarDay Control Reference

Definition and Usage

The IsOtherMonth property is used to get whether or not the date is in the month displayed by the calendar.

This property returns "FALSE" if the date is the displayed month.


Example

The following example shows if the selected day is in the current month or not:

<script runat="server">
Sub DaySelect(obj As Object, e As DayRenderEventArgs)
  If e.Day.IsSelected Then
    If e.Day.IsOtherMonth = "TRUE" Then
      Label1.Text = "NO"
    Else
      Label1.Text = "YES"
    End If
  End If
End Subv </script>

<form runat="server">
  <asp:Calendar id="cal1" runat="server"
  OnDayRender="DaySelect"/>
  The selected date is in the current month:
  <asp:Label id="Label1" runat="server"/>
</form>

Show example »

CalendarDay Control Reference Complete CalendarDay Control Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook