UNPKG

1.31 kBTypeScriptView Raw
1import { NgbDate } from './ngb-date';
2/**
3 * The context for the datepicker 'day' template.
4 *
5 * You can override the way dates are displayed in the datepicker via the `[dayTemplate]` input.
6 */
7export interface DayTemplateContext {
8 /**
9 * The date that corresponds to the template. Same as the `date` parameter.
10 *
11 * Can be used for convenience as a default template key, ex. `let-d`.
12 *
13 * @since 3.3.0
14 */
15 $implicit: NgbDate;
16 /**
17 * The month currently displayed by the datepicker.
18 */
19 currentMonth: number;
20 /**
21 * The year currently displayed by the datepicker.
22 *
23 * @since 5.2.0
24 */
25 currentYear: number;
26 /**
27 * Any data you pass using the `[dayTemplateData]` input in the datepicker.
28 *
29 * @since 3.3.0
30 */
31 data?: any;
32 /**
33 * The date that corresponds to the template.
34 */
35 date: NgbDate;
36 /**
37 * `True` if the current date is disabled.
38 */
39 disabled: boolean;
40 /**
41 * `True` if the current date is focused.
42 */
43 focused: boolean;
44 /**
45 * `True` if the current date is selected.
46 */
47 selected: boolean;
48 /**
49 * `True` if the current date is today (equal to `NgbCalendar.getToday()`).
50 *
51 * @since 4.1.0
52 */
53 today: boolean;
54}