Re: calendar control : how to retrieve the "shown" month and year
- From: "Kim Quigley" <kimquigley@xxxxxxxxxxx>
- Date: Fri, 17 Jun 2005 11:32:30 -0400
Now I'm confused about what you're asking. If you don't set VisibleDate
anywhere, then it defaults to the current month until the user changes it.
VisibleDate should always be the same as what you are actually seeing.
Maybe you are putting your code in the wrong spot. I tried checking
VisibleDate from the Page_Load, but it wasn't set. Try putting your code
inside the VisibleMonthChanged method. Of course, someone will actually have
to change the month for this event to fire. But if the month hasn't been
changed or set, then you'll know what the values of BeginRange and EndRange
should be (the current month)
Private Sub Calendar1_VisibleMonthChanged(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.MonthChangedEventArgs) Handles
Calendar1.VisibleMonthChanged
Dim themonth As String = Me.Calendar1.VisibleDate.Month
Dim theyear As String = Me.Calendar1.VisibleDate.Year
Dim BeginRange As Date
Dim EndRange As Date
BeginRange = themonth & "/1/" & theyear
Dim daysinmonth As Integer = BeginRange.DaysInMonth(theyear, themonth)
EndRange = themonth & "/" & daysinmonth & "/" & theyear
End Sub
"tfsmag" <tfsmag@xxxxxxxxx> wrote in message
news:1119020126.160245.235170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> visible date was not set, if i set the visible date to date.now it
> doesn't change with the month. is there a way to make visibledate
> change when you click forward or backward a month?
>
.
- Follow-Ups:
- References:
- calendar control : how to retrieve the "shown" month and year
- From: tfsmag
- Re: calendar control : how to retrieve the "shown" month and year
- From: Kim Quigley
- Re: calendar control : how to retrieve the "shown" month and year
- From: tfsmag
- Re: calendar control : how to retrieve the "shown" month and year
- From: Kim Quigley
- Re: calendar control : how to retrieve the "shown" month and year
- From: tfsmag
- calendar control : how to retrieve the "shown" month and year
- Prev by Date: Re: Passing Dynamic Values to a Stored Procedure with selectparameters
- Next by Date: Re: Extended Web Data Administrator
- Previous by thread: Re: calendar control : how to retrieve the "shown" month and year
- Next by thread: Re: calendar control : how to retrieve the "shown" month and year
- Index(es):