Skip to main content
Version: 1.x

@microsoft/fast-foundation > Calendar > dateInString

Calendar.dateInString() method

A helper function that checks if a date exists in a list of dates

Signature:
dateInString(date: Date | string, datesString: string): boolean;

Parameters

ParameterTypeDescription
dateDate | stringA date objec that includes the day, month and year
datesStringstringa comma separated list of dates
Returns:

boolean

  • Returns true if it found the date in the list of dates