Main Page | Forums | Register | Active Topics | Members | Search
 
Username:
Password:
ASP Calendars Forum >> ASP Calendars >> Tips, Trick's How-To's >> Week view to always start on Sunday
Week view to always start on Sunday
Author Topic
DataBasic


Newbie

Join Date: 10/20/2008
Posts: 3

Posted: 10/20/2008 8:41:53 AM

If like me you get easily confused by the week view always starting from whatever day is the 1st of the month, then this code will sort you out :)

Add this line of code...

pDate = pDate.AddDays(pDate.DayOfWeek * -1)

... to the top of the LoadWeekCalendar subroutine (controls/Calendar.ascx.vb) and the week view will now always start from sunday

DataBasic


  Copyright ASP Calendars DMG Forums 3.1