packages/material-ui-lab/src/internal/pickers/date-utils.ts/isRangeValid
export const isRangeValid = <TDate>(
  utils: MuiPickersAdapter<TDate>,
  range: DateRange<TDate> | null,
): range is NonEmptyDateRange<TDate> => {
  return Boolean(range && range[0] && range[1] && utils.isBefore(range[0], range[1]));
};