code: public DateRange getSelectedRange() {
          Dateitem selected = getSelectedItem();
          return selected == null ? null : (DateRange) selected.getData();
      }
docs: Returns the date range item that is currently selected.
  
  @return Selected date range item, or null if none selected.