mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
Issue number: resolves #29833 --------- - Adds the `border` property for customizing the border of highlighted dates - Adds the `border` to the e2e test for highlightedDates - Updates screenshots --------- Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
53 lines
1.4 KiB
TypeScript
53 lines
1.4 KiB
TypeScript
export interface DatetimeChangeEventDetail {
|
|
value?: string | string[] | null;
|
|
}
|
|
|
|
export interface DatetimeCustomEvent extends CustomEvent {
|
|
detail: DatetimeChangeEventDetail;
|
|
target: HTMLIonDatetimeElement;
|
|
}
|
|
|
|
export interface DatetimeParts {
|
|
month: number;
|
|
day: number | null;
|
|
year: number;
|
|
dayOfWeek?: number | null;
|
|
hour?: number;
|
|
minute?: number;
|
|
ampm?: 'am' | 'pm';
|
|
isAdjacentDay?: boolean;
|
|
}
|
|
|
|
export type DatetimePresentation = 'date-time' | 'time-date' | 'date' | 'time' | 'month' | 'year' | 'month-year';
|
|
|
|
export type TitleSelectedDatesFormatter = (selectedDates: string[]) => string;
|
|
|
|
/**
|
|
* DatetimeHighlightStyle must include textColor, backgroundColor, or border.
|
|
* It cannot be an empty object.
|
|
*/
|
|
export type DatetimeHighlightStyle = {
|
|
textColor?: string;
|
|
backgroundColor?: string;
|
|
border?: string;
|
|
} & ({ textColor: string } | { backgroundColor: string } | { border: string });
|
|
|
|
export type DatetimeHighlight = { date: string } & DatetimeHighlightStyle;
|
|
|
|
export type DatetimeHighlightCallback = (dateIsoString: string) => DatetimeHighlightStyle | undefined;
|
|
|
|
export type DatetimeHourCycle = 'h11' | 'h12' | 'h23' | 'h24';
|
|
|
|
/**
|
|
* FormatOptions must include date and/or time; it cannot be an empty object
|
|
*/
|
|
export type FormatOptions =
|
|
| {
|
|
date: Intl.DateTimeFormatOptions;
|
|
time?: Intl.DateTimeFormatOptions;
|
|
}
|
|
| {
|
|
date?: Intl.DateTimeFormatOptions;
|
|
time: Intl.DateTimeFormatOptions;
|
|
};
|