+ @if (Shown)
+ {
+
+
+
+
+ @switch (Selecting)
+ {
+ case Selecting.Years:
+ {
+
+
+
Selecting = Selecting.Months)>@Date.ToString("yyyy")
+
+
+ @for (int i = Date.Year - 7; i < Date.Year + 8; i++)
+ {
+ int y = i;
+
SetYear(y))">
+
+
+
+ if (Date.Year - i % 3 == 0)
+ {
+
+ }
+ }
+ break;
+ }
+ case Selecting.Months:
+ {
+
+
+
Selecting = Selecting.Years)>@Date.ToString("MMMM yyyy")
+
+
+ @for (int i = 1; i <= @DateTimeFormatInfo.CurrentInfo.MonthNames.Length - 1; i++)
+ {
+ int m = i;
+
SetMonth(m))">
+
+
+
+
@DateTimeFormatInfo.CurrentInfo.GetMonthName(i).Substring(0,3)
+
+
+
+
+ if (i % 3 == 0)
+ {
+
+ }
+ }
+ break;
+ }
+ case (Selecting.Days):
+ {
+
+
+
Selecting = Selecting.Months)>@Date.ToString("MMMM yyyy")
+
+
+
+ @for (int i = 0; i < 7; i++)
+ {
+
@calendarStart.AddDays(i).ToString("ddd")
+ }
+ @foreach (var Date in Dates)
+ {
+
SetDate(Date))">
+
+ @Date.Day.ToString()
+
+
+ @if (calendarStart.DayOfWeek.Equals(DayOfWeek.Sunday))
+ {
+
+ }
+
+ calendarStart = calendarStart.AddDays(1);
+ }
+ break;
+ }
+ }
+