private void ShowMonthLayout() { dayPicker = new DayPicker(CalendarHelper.CreateDayLayouts(CalendarHelper.GetDaysInMonth(selectedMonth, selectedYear))); monthButton.ContentView = dayPicker; SelectItem(monthButton); dayPicker.DateChanged += (sender, e) => SelectDate(new DateTime(SelectedDate.Year, SelectedDate.Month, dayPicker.SelectedItem, 0, 0, 0, DateTimeKind.Local)); if (SelectedDate.Month == selectedMonth) { dayPicker.SelectDay(SelectedDate.Day); } }
private void ShowMonthLayout() { dayPicker = new DayPicker (CalendarHelper.CreateDayLayouts (CalendarHelper.GetDaysInMonth (selectedMonth, selectedYear))); monthButton.ContentView = dayPicker; SelectItem(monthButton); dayPicker.DateChanged += (sender, e) => SelectDate (new DateTime (SelectedDate.Year, SelectedDate.Month, dayPicker.SelectedItem, 0, 0, 0, DateTimeKind.Local)); if (SelectedDate.Month == selectedMonth) { dayPicker.SelectDay (SelectedDate.Day); } }