How to use the terra-date-picker/lib/DateUtil.isDateExcluded function in terra-date-picker

To help you get started, we’ve selected a few terra-date-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 cerner / terra-core / packages / terra-date-time-picker / src / DateTimePicker.jsx View on Github external
validateDefaultDate() {
    let isAcceptable = true;

    if (DateUtil.isDateOutOfRange(this.state.dateTime, DateUtil.createSafeDate(this.props.minDateTime), DateUtil.createSafeDate(this.props.maxDateTime))) {
      isAcceptable = false;
    }

    if (DateUtil.isDateExcluded(this.state.dateTime, this.props.excludeDates)) {
      isAcceptable = false;
    }

    return isAcceptable;
  }
github cerner / terra-framework / packages / terra-date-time-picker / src / DateTimePicker.jsx View on Github external
isDateTimeWithinRange(newDateTime) {
    let isAcceptable = true;

    if (DateUtil.isDateOutOfRange(newDateTime, DateUtil.createSafeDate(this.props.minDateTime), DateUtil.createSafeDate(this.props.maxDateTime))) {
      isAcceptable = false;
    }

    if (DateUtil.isDateExcluded(newDateTime, this.props.excludeDates)) {
      isAcceptable = false;
    }

    return isAcceptable;
  }

terra-date-picker

The terra-date-picker component provides users a way to enter or select a date from the date picker.

Apache-2.0
Latest version published 6 months ago

Package Health Score

54 / 100
Full package analysis