MCPcopy
hub / github.com/palantir/blueprint / parseDate

Method parseDate

packages/datetime/src/dateInput.tsx:473–480  ·  view source on GitHub ↗
(dateString: string)

Source from the content-addressed store, hash-verified

471 }
472
473 private parseDate(dateString: string): Date | null {
474 if (dateString === this.props.outOfRangeMessage || dateString === this.props.invalidDateMessage) {
475 return null;
476 }
477 const { locale, parseDate } = this.props;
478 const newDate = parseDate(dateString, locale);
479 return newDate === false ? new Date(undefined) : newDate;
480 }
481
482 private formatDate(date: Date): string {
483 if (!isDateValid(date) || !this.isDateInRange(date)) {

Callers 1

DateInputClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected