@@ -21,7 +21,9 @@ const TEMPLATE_OPTIONS:any = {
21
21
<span [ngClass]="{'text-muted': dtz.secondary || dtz.current}">{{dtz.label}}</span>
22
22
</button>
23
23
</td>
24
- `
24
+ ` ,
25
+ ARROW_LEFT : '<' ,
26
+ ARROW_RIGHT : '>'
25
27
} ,
26
28
[ Ng2BootstrapTheme . BS3 ] : {
27
29
DAY_TITLE : `
@@ -38,6 +40,12 @@ const TEMPLATE_OPTIONS:any = {
38
40
<span [ngClass]="{'text-muted': dtz.secondary, 'text-info': dtz.current}">{{dtz.label}}</span>
39
41
</button>
40
42
</td>
43
+ ` ,
44
+ ARROW_LEFT : `
45
+ <i class="glyphicon glyphicon-chevron-left"></i>
46
+ ` ,
47
+ ARROW_RIGHT : `
48
+ <i class="glyphicon glyphicon-chevron-right"></i>
41
49
`
42
50
}
43
51
} ;
@@ -52,30 +60,21 @@ const CURRENT_THEME_TEMPLATE:any = TEMPLATE_OPTIONS[Ng2BootstrapConfig.theme ||
52
60
<tr>
53
61
<th>
54
62
<button type="button" class="btn btn-default btn-secondary btn-sm pull-left" (click)="datePicker.move(-1)" tabindex="-1">
55
- <i class="glyphicon glyphicon-chevron-left"></i>
56
- </button>
57
- </th>
58
- <th colspan="5" [hidden]="datePicker.showWeeks">
59
- <button [id]="datePicker.uniqueId + '-title'"
60
- type="button" class="btn btn-default btn-secondary btn-sm"
61
- (click)="datePicker.toggleMode()"
62
- [disabled]="datePicker.datepickerMode === maxMode"
63
- [ngClass]="{disabled: datePicker.datepickerMode === maxMode}" tabindex="-1" style="width:100%;">
64
- <strong>{{title}}</strong>
63
+ ${ CURRENT_THEME_TEMPLATE . ARROW_LEFT }
65
64
</button>
66
65
</th>
67
- <th colspan="6" [hidden ]="! datePicker.showWeeks">
66
+ <th [attr.colspan ]="5 + datePicker.showWeeks">
68
67
<button [id]="datePicker.uniqueId + '-title'"
69
68
type="button" class="btn btn-default btn-secondary btn-sm"
70
69
(click)="datePicker.toggleMode()"
71
- [disabled]="datePicker.datepickerMode === maxMode"
72
- [ngClass]="{disabled: datePicker.datepickerMode === maxMode}" tabindex="-1" style="width:100%;">
70
+ [disabled]="datePicker.datepickerMode === datePicker. maxMode"
71
+ [ngClass]="{disabled: datePicker.datepickerMode === datePicker. maxMode}" tabindex="-1" style="width:100%;">
73
72
<strong>{{title}}</strong>
74
73
</button>
75
74
</th>
76
75
<th>
77
76
<button type="button" class="btn btn-default btn-secondary btn-sm pull-right" (click)="datePicker.move(1)" tabindex="-1">
78
- <i class="glyphicon glyphicon-chevron-right"></i>
77
+ ${ CURRENT_THEME_TEMPLATE . ARROW_RIGHT }
79
78
</button>
80
79
</th>
81
80
</tr>
@@ -150,7 +149,7 @@ export class DayPicker implements OnInit {
150
149
firstDate . setDate ( - numDisplayedFromPreviousMonth + 1 ) ;
151
150
}
152
151
153
- // 42 is the number of days on a six-month calendar
152
+ // 42 is the number of days on a six-week calendar
154
153
let _days :Array < Date > = self . getDates ( firstDate , 42 ) ;
155
154
let days :Array < any > = [ ] ;
156
155
for ( let i = 0 ; i < 42 ; i ++ ) {
0 commit comments