feat(datetime): add ability to specify custom colors for specific dates (#26775)

This commit is contained in:
Amanda Johnston
2023-02-22 09:01:33 -06:00
committed by GitHub
parent fc5fcc064d
commit 2a761afd5a
30 changed files with 363 additions and 43 deletions

View File

@ -25,3 +25,17 @@ export interface DatetimeParts {
export type DatetimePresentation = 'date-time' | 'time-date' | 'date' | 'time' | 'month' | 'year' | 'month-year';
export type TitleSelectedDatesFormatter = (selectedDates: string[]) => string;
export type DatetimeHighlightStyle =
| {
textColor: string;
backgroundColor?: string;
}
| {
textColor?: string;
backgroundColor: string;
};
export type DatetimeHighlight = { date: string } & DatetimeHighlightStyle;
export type DatetimeHighlightCallback = (dateIsoString: string) => DatetimeHighlightStyle | undefined;