How to use the react-day-picker.DateUtils.isDate function in react-day-picker

To help you get started, we’ve selected a few react-day-picker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sentinel-hub / EOBrowser / src / components / DayPicker / index.js View on Github external
handleKeyPress = e => {
    if (e.key === 'Enter') {
      if (DateUtils.isDate(new Date(e.target.value))) {
        this.handleDayClick(e.target.value);
      }
    }
  };
github nikitavoloboev / build-to-learn / next / components / airbnb / DateRangePicker.tsx View on Github external
const parseDate = (str, format, locale) => {
  const parsed = dateFnsParse(str, format, new Date(), { locale });
  return DateUtils.isDate(parsed) ? parsed : null;
};
github gpbl / react-day-picker / docs / src / code-samples / examples / input-date-fns.js View on Github external
function parseDate(str, format, locale) {
  const parsed = dateFnsParse(str, format, { locale });
  if (DateUtils.isDate(parsed)) {
    return parsed;
  }
  return undefined;
}