protected override void OnItemClick(DevExpress.XtraEditors.Calendar.CalendarHitInfo hitInfo) { DayNumberCellInfo cell = hitInfo.HitObject as DayNumberCellInfo; if (View == DateEditCalendarViewType.YearInfo) { DateTime dt = new DateTime(DateTime.Year, cell.Date.Month, 1); OnDateTimeCommit(dt, false); } else { base.OnItemClick(hitInfo); } }
protected override void OnItemClick(DevExpress.XtraEditors.Calendar.CalendarHitInfo hitInfo) { DayNumberCellInfo cell = hitInfo.HitObject as DayNumberCellInfo; if (View == DateEditCalendarViewType.YearInfo) { DateTime dt = new DateTime(DateTime.Year, cell.Date.Month, 1, 0, 0, 0); if (DateMode == DateEditEx.DateResultModeEnum.FirstDayOfMonth) { OnDateTimeCommit(dt, false); } else { DateTime tempDate = dt.AddMonths(1).AddDays(-1); tempDate = new DateTime(tempDate.Year, tempDate.Month, tempDate.Day, 23, 59, 59); OnDateTimeCommit(tempDate, false); } } else { base.OnItemClick(hitInfo); } }