예제 #1
0
        protected void ChangePickerYearValue(int interval)
        {
            DateTime baseDate;

            if (IsShowTime || PickerIndex == 0)
            {
                baseDate = PickerValue;
            }
            else
            {
                baseDate = Picker switch
                {
                    DatePickerType.Date => PickerValue.AddMonths(-1),
                    DatePickerType.Week => PickerValue.AddMonths(-1),
                    DatePickerType.Year => PickerValue.AddYears(-10),
                    _ => PickerValue.AddYears(-1)
                };
            }
            ChangePickerValue(DateHelper.AddYearsSafely(baseDate, interval), null);
        }
 protected void ChangePickerYearValue(int interval)
 {
     DatePicker.ChangePickerValue(PickerValue.AddYears(interval), PickerIndex);
 }