Mujtaba Hassan
Mujtaba Hassan

Reputation: 2493

Current month in Calendar view

I'm sure this would be something very easy but I'm unable to sort it out. I'm using a calendar view in ASP.Net and have to apply a check as follows.

if (Calendar1.TodaysDate.Month == e.Day.Date.Month)
{
}

Instead of using TodaysDate I want the month that is currently displaying on the view i.e. its Febraury right now and when I click the Next icon to display March it still has Feb in Calendar1.TodaysDate.Month (because the current date is in Feb. What property can I use?

Upvotes: 2

Views: 3845

Answers (1)

Dooie
Dooie

Reputation: 176

Calendar1.VisibleDate.Month gets the date of the visible month

Upvotes: 2

Related Questions