Пример #1
0
 protected void GoNextYear(DateTimePickerOption option)
 {
     if (option.ShowYear > 0)
     {
         option.ShowYear += 10;
         return;
     }
     option.CurrentMonth = option.CurrentMonth.AddYears(1);
 }
Пример #2
0
 protected void GoPrevYear(DateTimePickerOption option)
 {
     if (option.ShowYear > 0 && option.ShowYear > 1900)
     {
         option.ShowYear -= 10;
         return;
     }
     if (option.CurrentMonth.Year < 1900)
     {
         return;
     }
     option.CurrentMonth = option.CurrentMonth.AddYears(-1);
 }
Пример #3
0
 protected void SelectDay(DateTimePickerOption option, DateTime day)
 {
     option.CurrentMonth = day;
     option.TaskComplietionSource.SetResult(day);
     CloseDateTimePicker(option);
 }
Пример #4
0
 protected void CloseDateTimePicker(DateTimePickerOption option)
 {
     PopupService.DateTimePickerOptions.Remove(option);
 }
Пример #5
0
 protected void OpenMonth(DateTimePickerOption option, int month)
 {
     option.ShowYear     = option.ShowMonth = 0;
     option.CurrentMonth = new DateTime(option.CurrentMonth.Year, month, 1);
 }