private static Calendar maxDate(List<Calendar> selectedCals) {
   if (selectedCals == null || selectedCals.size() == 0) {
     return null;
   }
   Collections.sort(selectedCals);
   return selectedCals.get(selectedCals.size() - 1);
 }
 public List<Date> getSelectedDates() {
   List<Date> selectedDates = new ArrayList<Date>();
   for (MonthCellDescriptor cal : selectedCells) {
     selectedDates.add(cal.getDate());
   }
   Collections.sort(selectedDates);
   return selectedDates;
 }