onCustomClicked method

void onCustomClicked()

Replace existing range with a Custom range having the same endpoints as the current selection

Implementation

void onCustomClicked() {
  var oldRange = model.value?.range;
  _presetSelection.clear();
  if (oldRange != null) {
    model.selectRange(DatepickerDateRange.custom(oldRange.start, oldRange.end)
        .clamp(min: minDate, max: maxDate));
  }
  if (model.basic) {
    model.shouldShowPredefinedList = false;
    model.shouldShowCustomDateRangeColumn = true;
  }
}