packages/material-ui-lab/src/internal/pickers/text-field-helper.ts/getDisplayDate
export const getDisplayDate = (
  utils: MuiPickersAdapter,
  value: ParsableDate,
  inputFormat: string,
) => {
  const date = utils.date(value);
  const isEmpty = value === null;

  if (isEmpty) {
    return '';
  }

  return utils.isValid(date) ? utils.formatByString(date, inputFormat) : '';
};