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