primeng 4.1.2 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/autocomplete/autocomplete.d.ts +7 -0
- package/components/autocomplete/autocomplete.js +63 -6
- package/components/autocomplete/autocomplete.js.map +1 -1
- package/components/autocomplete/autocomplete.metadata.json +1 -1
- package/components/blockui/blockui.js +1 -0
- package/components/blockui/blockui.js.map +1 -1
- package/components/breadcrumb/breadcrumb.js +1 -1
- package/components/breadcrumb/breadcrumb.js.map +1 -1
- package/components/breadcrumb/breadcrumb.metadata.json +1 -1
- package/components/calendar/calendar.d.ts +36 -14
- package/components/calendar/calendar.js +337 -108
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/calendar.metadata.json +1 -1
- package/components/checkbox/checkbox.js +1 -1
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/checkbox.metadata.json +1 -1
- package/components/chips/chips.d.ts +2 -0
- package/components/chips/chips.js +25 -11
- package/components/chips/chips.js.map +1 -1
- package/components/chips/chips.metadata.json +1 -1
- package/components/common/menuitem.d.ts +1 -0
- package/components/common/messageservice.d.ts +9 -0
- package/components/common/messageservice.js +35 -0
- package/components/common/messageservice.js.map +1 -0
- package/components/common/messageservice.metadata.json +1 -0
- package/components/common/selectitem.d.ts +1 -0
- package/components/common/shared.d.ts +1 -0
- package/components/common/shared.js +4 -0
- package/components/common/shared.js.map +1 -1
- package/components/common/shared.metadata.json +1 -1
- package/components/contextmenu/contextmenu.d.ts +2 -0
- package/components/contextmenu/contextmenu.js +18 -5
- package/components/contextmenu/contextmenu.js.map +1 -1
- package/components/contextmenu/contextmenu.metadata.json +1 -1
- package/components/datatable/datatable.d.ts +14 -0
- package/components/datatable/datatable.js +113 -38
- package/components/datatable/datatable.js.map +1 -1
- package/components/datatable/datatable.metadata.json +1 -1
- package/components/dropdown/dropdown.d.ts +4 -2
- package/components/dropdown/dropdown.js +25 -13
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/dropdown/dropdown.metadata.json +1 -1
- package/components/fileupload/fileupload.d.ts +16 -4
- package/components/fileupload/fileupload.js +72 -9
- package/components/fileupload/fileupload.js.map +1 -1
- package/components/fileupload/fileupload.metadata.json +1 -1
- package/components/growl/growl.d.ts +9 -2
- package/components/growl/growl.js +45 -8
- package/components/growl/growl.js.map +1 -1
- package/components/growl/growl.metadata.json +1 -1
- package/components/inputmask/inputmask.d.ts +4 -1
- package/components/inputmask/inputmask.js +28 -7
- package/components/inputmask/inputmask.js.map +1 -1
- package/components/inputmask/inputmask.metadata.json +1 -1
- package/components/listbox/listbox.d.ts +3 -0
- package/components/listbox/listbox.js +14 -1
- package/components/listbox/listbox.js.map +1 -1
- package/components/listbox/listbox.metadata.json +1 -1
- package/components/megamenu/megamenu.js +1 -1
- package/components/megamenu/megamenu.js.map +1 -1
- package/components/megamenu/megamenu.metadata.json +1 -1
- package/components/menu/menu.js +2 -2
- package/components/menu/menu.js.map +1 -1
- package/components/menu/menu.metadata.json +1 -1
- package/components/menubar/menubar.js +1 -1
- package/components/menubar/menubar.js.map +1 -1
- package/components/menubar/menubar.metadata.json +1 -1
- package/components/messages/messages.d.ts +8 -2
- package/components/messages/messages.js +29 -3
- package/components/messages/messages.js.map +1 -1
- package/components/messages/messages.metadata.json +1 -1
- package/components/multiselect/multiselect.d.ts +8 -2
- package/components/multiselect/multiselect.js +40 -6
- package/components/multiselect/multiselect.js.map +1 -1
- package/components/multiselect/multiselect.metadata.json +1 -1
- package/components/orderlist/orderlist.js +1 -1
- package/components/orderlist/orderlist.js.map +1 -1
- package/components/organizationchart/organizationchart.js +2 -2
- package/components/organizationchart/organizationchart.js.map +1 -1
- package/components/organizationchart/organizationchart.metadata.json +1 -1
- package/components/paginator/paginator.d.ts +2 -1
- package/components/paginator/paginator.js +19 -10
- package/components/paginator/paginator.js.map +1 -1
- package/components/paginator/paginator.metadata.json +1 -1
- package/components/panel/panel.js +1 -1
- package/components/panel/panel.js.map +1 -1
- package/components/panelmenu/panelmenu.js +2 -2
- package/components/panelmenu/panelmenu.js.map +1 -1
- package/components/panelmenu/panelmenu.metadata.json +1 -1
- package/components/picklist/picklist.js +18 -8
- package/components/picklist/picklist.js.map +1 -1
- package/components/radiobutton/radiobutton.js +2 -2
- package/components/radiobutton/radiobutton.js.map +1 -1
- package/components/radiobutton/radiobutton.metadata.json +1 -1
- package/components/schedule/schedule.d.ts +2 -1
- package/components/schedule/schedule.js +14 -7
- package/components/schedule/schedule.js.map +1 -1
- package/components/schedule/schedule.metadata.json +1 -1
- package/components/selectbutton/selectbutton.d.ts +2 -1
- package/components/selectbutton/selectbutton.js +12 -2
- package/components/selectbutton/selectbutton.js.map +1 -1
- package/components/selectbutton/selectbutton.metadata.json +1 -1
- package/components/slidemenu/slidemenu.d.ts +1 -0
- package/components/slidemenu/slidemenu.js +18 -3
- package/components/slidemenu/slidemenu.js.map +1 -1
- package/components/slidemenu/slidemenu.metadata.json +1 -1
- package/components/slider/slider.d.ts +11 -4
- package/components/slider/slider.js +70 -29
- package/components/slider/slider.js.map +1 -1
- package/components/slider/slider.metadata.json +1 -1
- package/components/spinner/spinner.d.ts +5 -3
- package/components/spinner/spinner.js +21 -11
- package/components/spinner/spinner.js.map +1 -1
- package/components/spinner/spinner.metadata.json +1 -1
- package/components/tabmenu/tabmenu.js +1 -1
- package/components/tabmenu/tabmenu.js.map +1 -1
- package/components/tabmenu/tabmenu.metadata.json +1 -1
- package/components/tabview/tabview.d.ts +16 -6
- package/components/tabview/tabview.js +65 -17
- package/components/tabview/tabview.js.map +1 -1
- package/components/tabview/tabview.metadata.json +1 -1
- package/components/terminal/terminal.d.ts +8 -5
- package/components/terminal/terminal.js +15 -13
- package/components/terminal/terminal.js.map +1 -1
- package/components/terminal/terminal.metadata.json +1 -1
- package/components/terminal/terminalservice.d.ts +9 -0
- package/components/terminal/terminalservice.js +34 -0
- package/components/terminal/terminalservice.js.map +1 -0
- package/components/terminal/terminalservice.metadata.json +1 -0
- package/components/tieredmenu/tieredmenu.js +1 -1
- package/components/tieredmenu/tieredmenu.js.map +1 -1
- package/components/tieredmenu/tieredmenu.metadata.json +1 -1
- package/components/tooltip/tooltip.d.ts +4 -1
- package/components/tooltip/tooltip.js +27 -5
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tooltip/tooltip.metadata.json +1 -1
- package/components/tree/tree.d.ts +2 -0
- package/components/tree/tree.js +19 -5
- package/components/tree/tree.js.map +1 -1
- package/components/tree/tree.metadata.json +1 -1
- package/components/treetable/treetable.d.ts +2 -0
- package/components/treetable/treetable.js +11 -1
- package/components/treetable/treetable.js.map +1 -1
- package/components/treetable/treetable.metadata.json +1 -1
- package/package.json +19 -19
- package/resources/primeng.css +451 -68
- package/resources/primeng.min.css +1 -1
- package/resources/themes/_theme.scss +8 -0
- package/resources/themes/cruze/theme.css +6 -0
- package/resources/themes/cupertino/theme.css +6 -0
- package/resources/themes/darkness/theme.css +6 -0
- package/resources/themes/flick/theme.css +6 -0
- package/resources/themes/home/theme.css +6 -0
- package/resources/themes/kasper/theme.css +6 -0
- package/resources/themes/lightness/theme.css +6 -0
- package/resources/themes/ludvig/theme.css +6 -0
- package/resources/themes/omega/theme.css +14 -0
- package/resources/themes/omega/theme.css.map +7 -0
- package/resources/themes/omega/theme.scss +11 -0
- package/resources/themes/pepper-grinder/theme.css +6 -0
- package/resources/themes/redmond/theme.css +6 -0
- package/resources/themes/rocket/theme.css +6 -0
- package/resources/themes/south-street/theme.css +6 -0
- package/resources/themes/start/theme.css +6 -0
- package/resources/themes/trontastic/theme.css +6 -0
- package/resources/themes/voclain/theme.css +6 -0
@@ -14,17 +14,13 @@ var animations_1 = require("@angular/animations");
|
|
14
14
|
var common_1 = require("@angular/common");
|
15
15
|
var button_1 = require("../button/button");
|
16
16
|
var domhandler_1 = require("../dom/domhandler");
|
17
|
+
var shared_1 = require("../common/shared");
|
17
18
|
var forms_1 = require("@angular/forms");
|
18
19
|
exports.CALENDAR_VALUE_ACCESSOR = {
|
19
20
|
provide: forms_1.NG_VALUE_ACCESSOR,
|
20
21
|
useExisting: core_1.forwardRef(function () { return Calendar; }),
|
21
22
|
multi: true
|
22
23
|
};
|
23
|
-
exports.CALENDAR_VALIDATOR = {
|
24
|
-
provide: forms_1.NG_VALIDATORS,
|
25
|
-
useExisting: core_1.forwardRef(function () { return Calendar; }),
|
26
|
-
multi: true
|
27
|
-
};
|
28
24
|
var Calendar = (function () {
|
29
25
|
function Calendar(el, domHandler, renderer, cd) {
|
30
26
|
this.el = el;
|
@@ -43,24 +39,29 @@ var Calendar = (function () {
|
|
43
39
|
this.showSeconds = false;
|
44
40
|
this.showOnFocus = true;
|
45
41
|
this.dataType = 'date';
|
42
|
+
this.selectionMode = 'single';
|
43
|
+
this.todayButtonStyleClass = 'ui-button-secondary';
|
44
|
+
this.clearButtonStyleClass = 'ui-button-secondary';
|
46
45
|
this.onFocus = new core_1.EventEmitter();
|
47
46
|
this.onBlur = new core_1.EventEmitter();
|
48
47
|
this.onClose = new core_1.EventEmitter();
|
49
48
|
this.onSelect = new core_1.EventEmitter();
|
50
49
|
this.onInput = new core_1.EventEmitter();
|
50
|
+
this.onTodayClick = new core_1.EventEmitter();
|
51
|
+
this.onClearClick = new core_1.EventEmitter();
|
51
52
|
this._locale = {
|
52
53
|
firstDayOfWeek: 0,
|
53
54
|
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
54
55
|
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
55
56
|
dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
56
57
|
monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
57
|
-
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
58
|
+
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
59
|
+
today: 'Today',
|
60
|
+
clear: 'Clear'
|
58
61
|
};
|
59
|
-
this.closeOverlay = true;
|
60
62
|
this.onModelChange = function () { };
|
61
63
|
this.onModelTouched = function () { };
|
62
64
|
this.inputFieldValue = null;
|
63
|
-
this._isValid = true;
|
64
65
|
}
|
65
66
|
Object.defineProperty(Calendar.prototype, "minDate", {
|
66
67
|
get: function () {
|
@@ -68,7 +69,9 @@ var Calendar = (function () {
|
|
68
69
|
},
|
69
70
|
set: function (date) {
|
70
71
|
this._minDate = date;
|
71
|
-
|
72
|
+
if (this.currentMonth && this.currentYear) {
|
73
|
+
this.createMonth(this.currentMonth, this.currentYear);
|
74
|
+
}
|
72
75
|
},
|
73
76
|
enumerable: true,
|
74
77
|
configurable: true
|
@@ -79,7 +82,48 @@ var Calendar = (function () {
|
|
79
82
|
},
|
80
83
|
set: function (date) {
|
81
84
|
this._maxDate = date;
|
82
|
-
|
85
|
+
if (this.currentMonth && this.currentYear) {
|
86
|
+
this.createMonth(this.currentMonth, this.currentYear);
|
87
|
+
}
|
88
|
+
},
|
89
|
+
enumerable: true,
|
90
|
+
configurable: true
|
91
|
+
});
|
92
|
+
Object.defineProperty(Calendar.prototype, "disabledDates", {
|
93
|
+
get: function () {
|
94
|
+
return this._disabledDates;
|
95
|
+
},
|
96
|
+
set: function (disabledDates) {
|
97
|
+
this._disabledDates = disabledDates;
|
98
|
+
if (this.currentMonth && this.currentYear) {
|
99
|
+
this.createMonth(this.currentMonth, this.currentYear);
|
100
|
+
}
|
101
|
+
},
|
102
|
+
enumerable: true,
|
103
|
+
configurable: true
|
104
|
+
});
|
105
|
+
Object.defineProperty(Calendar.prototype, "disabledDays", {
|
106
|
+
get: function () {
|
107
|
+
return this._disabledDays;
|
108
|
+
},
|
109
|
+
set: function (disabledDays) {
|
110
|
+
this._disabledDays = disabledDays;
|
111
|
+
if (this.currentMonth && this.currentYear) {
|
112
|
+
this.createMonth(this.currentMonth, this.currentYear);
|
113
|
+
}
|
114
|
+
},
|
115
|
+
enumerable: true,
|
116
|
+
configurable: true
|
117
|
+
});
|
118
|
+
Object.defineProperty(Calendar.prototype, "showTime", {
|
119
|
+
get: function () {
|
120
|
+
return this._showTime;
|
121
|
+
},
|
122
|
+
set: function (showTime) {
|
123
|
+
this._showTime = showTime;
|
124
|
+
if (this.currentHour === undefined) {
|
125
|
+
this.initTime(this.value || new Date());
|
126
|
+
}
|
83
127
|
},
|
84
128
|
enumerable: true,
|
85
129
|
configurable: true
|
@@ -101,20 +145,7 @@ var Calendar = (function () {
|
|
101
145
|
this.createWeekDays();
|
102
146
|
this.currentMonth = date.getMonth();
|
103
147
|
this.currentYear = date.getFullYear();
|
104
|
-
this.
|
105
|
-
if (this.showTime) {
|
106
|
-
this.currentMinute = date.getMinutes();
|
107
|
-
this.currentSecond = date.getSeconds();
|
108
|
-
if (this.hourFormat == '12')
|
109
|
-
this.currentHour = date.getHours() == 0 ? 12 : date.getHours() % 12;
|
110
|
-
else
|
111
|
-
this.currentHour = date.getHours();
|
112
|
-
}
|
113
|
-
else if (this.timeOnly) {
|
114
|
-
this.currentMinute = 0;
|
115
|
-
this.currentHour = 0;
|
116
|
-
this.currentSecond = 0;
|
117
|
-
}
|
148
|
+
this.initTime(date);
|
118
149
|
this.createMonth(this.currentMonth, this.currentYear);
|
119
150
|
this.ticksTo1970 = (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
|
120
151
|
Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000);
|
@@ -140,6 +171,19 @@ var Calendar = (function () {
|
|
140
171
|
this.overlayShown = false;
|
141
172
|
}
|
142
173
|
};
|
174
|
+
Calendar.prototype.ngAfterContentInit = function () {
|
175
|
+
var _this = this;
|
176
|
+
this.templates.forEach(function (item) {
|
177
|
+
switch (item.getType()) {
|
178
|
+
case 'date':
|
179
|
+
_this.dateTemplate = item.template;
|
180
|
+
break;
|
181
|
+
default:
|
182
|
+
_this.dateTemplate = item.template;
|
183
|
+
break;
|
184
|
+
}
|
185
|
+
});
|
186
|
+
};
|
143
187
|
Calendar.prototype.createWeekDays = function () {
|
144
188
|
this.weekDays = [];
|
145
189
|
var dayIndex = this.locale.firstDayOfWeek;
|
@@ -192,6 +236,22 @@ var Calendar = (function () {
|
|
192
236
|
this.dates.push(week);
|
193
237
|
}
|
194
238
|
};
|
239
|
+
Calendar.prototype.initTime = function (date) {
|
240
|
+
this.pm = date.getHours() > 11;
|
241
|
+
if (this.showTime) {
|
242
|
+
this.currentMinute = date.getMinutes();
|
243
|
+
this.currentSecond = date.getSeconds();
|
244
|
+
if (this.hourFormat == '12')
|
245
|
+
this.currentHour = date.getHours() == 0 ? 12 : date.getHours() % 12;
|
246
|
+
else
|
247
|
+
this.currentHour = date.getHours();
|
248
|
+
}
|
249
|
+
else if (this.timeOnly) {
|
250
|
+
this.currentMinute = 0;
|
251
|
+
this.currentHour = 0;
|
252
|
+
this.currentSecond = 0;
|
253
|
+
}
|
254
|
+
};
|
195
255
|
Calendar.prototype.prevMonth = function (event) {
|
196
256
|
if (this.disabled) {
|
197
257
|
event.preventDefault();
|
@@ -229,74 +289,135 @@ var Calendar = (function () {
|
|
229
289
|
event.preventDefault();
|
230
290
|
};
|
231
291
|
Calendar.prototype.onDateSelect = function (event, dateMeta) {
|
292
|
+
var _this = this;
|
232
293
|
if (this.disabled || !dateMeta.selectable) {
|
233
294
|
event.preventDefault();
|
234
295
|
return;
|
235
296
|
}
|
236
|
-
if (
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
this.createMonth(this.currentMonth, this.currentYear);
|
241
|
-
this.selectDate(dateMeta);
|
242
|
-
}
|
297
|
+
if (this.isMultipleSelection() && this.isSelected(dateMeta)) {
|
298
|
+
this.value = this.value.filter(function (date, i) {
|
299
|
+
return !_this.isDateEquals(date, dateMeta);
|
300
|
+
});
|
243
301
|
}
|
244
302
|
else {
|
245
|
-
this.
|
303
|
+
if (this.shouldSelectDate(dateMeta)) {
|
304
|
+
if (dateMeta.otherMonth) {
|
305
|
+
if (this.selectOtherMonths) {
|
306
|
+
this.currentMonth = dateMeta.month;
|
307
|
+
this.currentYear = dateMeta.year;
|
308
|
+
this.createMonth(this.currentMonth, this.currentYear);
|
309
|
+
this.selectDate(dateMeta);
|
310
|
+
}
|
311
|
+
}
|
312
|
+
else {
|
313
|
+
this.selectDate(dateMeta);
|
314
|
+
}
|
315
|
+
}
|
316
|
+
}
|
317
|
+
if (this.isSingleSelection()) {
|
318
|
+
this.overlayVisible = false;
|
246
319
|
}
|
247
|
-
this.dateClick = true;
|
248
320
|
this.updateInputfield();
|
249
321
|
event.preventDefault();
|
250
322
|
};
|
323
|
+
Calendar.prototype.shouldSelectDate = function (dateMeta) {
|
324
|
+
if (this.isMultipleSelection())
|
325
|
+
return !this.maxDateCount || !this.value || this.maxDateCount > this.value.length;
|
326
|
+
else
|
327
|
+
return true;
|
328
|
+
};
|
251
329
|
Calendar.prototype.updateInputfield = function () {
|
330
|
+
var formattedValue = '';
|
252
331
|
if (this.value) {
|
253
|
-
|
254
|
-
|
255
|
-
formattedValue = this.formatTime(this.value);
|
332
|
+
if (this.isSingleSelection()) {
|
333
|
+
formattedValue = this.formatDateTime(this.value);
|
256
334
|
}
|
257
|
-
else {
|
258
|
-
|
259
|
-
|
260
|
-
formattedValue +=
|
335
|
+
else if (this.isMultipleSelection()) {
|
336
|
+
for (var i = 0; i < this.value.length; i++) {
|
337
|
+
var dateAsString = this.formatDateTime(this.value[i]);
|
338
|
+
formattedValue += dateAsString;
|
339
|
+
if (i !== (this.value.length - 1)) {
|
340
|
+
formattedValue += ', ';
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
else if (this.isRangeSelection()) {
|
345
|
+
if (this.value && this.value.length) {
|
346
|
+
var startDate = this.value[0];
|
347
|
+
var endDate = this.value[1];
|
348
|
+
formattedValue = this.formatDateTime(startDate);
|
349
|
+
if (endDate) {
|
350
|
+
formattedValue += ' - ' + this.formatDateTime(endDate);
|
351
|
+
}
|
261
352
|
}
|
262
353
|
}
|
263
|
-
this.inputFieldValue = formattedValue;
|
264
|
-
}
|
265
|
-
else {
|
266
|
-
this.inputFieldValue = '';
|
267
354
|
}
|
355
|
+
this.inputFieldValue = formattedValue;
|
268
356
|
this.updateFilledState();
|
269
357
|
if (this.inputfieldViewChild && this.inputfieldViewChild.nativeElement) {
|
270
358
|
this.inputfieldViewChild.nativeElement.value = this.inputFieldValue;
|
271
359
|
}
|
272
360
|
};
|
361
|
+
Calendar.prototype.formatDateTime = function (date) {
|
362
|
+
var formattedValue = null;
|
363
|
+
if (date) {
|
364
|
+
if (this.timeOnly) {
|
365
|
+
formattedValue = this.formatTime(date);
|
366
|
+
}
|
367
|
+
else {
|
368
|
+
formattedValue = this.formatDate(date, this.dateFormat);
|
369
|
+
if (this.showTime) {
|
370
|
+
formattedValue += ' ' + this.formatTime(date);
|
371
|
+
}
|
372
|
+
}
|
373
|
+
}
|
374
|
+
return formattedValue;
|
375
|
+
};
|
273
376
|
Calendar.prototype.selectDate = function (dateMeta) {
|
377
|
+
var date;
|
274
378
|
if (this.utc)
|
275
|
-
|
379
|
+
date = new Date(Date.UTC(dateMeta.year, dateMeta.month, dateMeta.day));
|
276
380
|
else
|
277
|
-
|
381
|
+
date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
278
382
|
if (this.showTime) {
|
279
383
|
if (this.hourFormat === '12' && this.pm && this.currentHour != 12)
|
280
|
-
|
384
|
+
date.setHours(this.currentHour + 12);
|
281
385
|
else
|
282
|
-
|
283
|
-
|
284
|
-
|
386
|
+
date.setHours(this.currentHour);
|
387
|
+
date.setMinutes(this.currentMinute);
|
388
|
+
date.setSeconds(this.currentSecond);
|
389
|
+
}
|
390
|
+
if (this.isSingleSelection()) {
|
391
|
+
this.updateModel(date);
|
392
|
+
}
|
393
|
+
else if (this.isMultipleSelection()) {
|
394
|
+
this.updateModel(this.value ? this.value.concat([date]) : [date]);
|
395
|
+
}
|
396
|
+
else if (this.isRangeSelection()) {
|
397
|
+
if (this.value && this.value.length) {
|
398
|
+
var startDate = this.value[0];
|
399
|
+
var endDate = this.value[1];
|
400
|
+
if (!endDate && date.getTime() > startDate.getTime()) {
|
401
|
+
endDate = date;
|
402
|
+
}
|
403
|
+
else {
|
404
|
+
startDate = date;
|
405
|
+
endDate = null;
|
406
|
+
}
|
407
|
+
this.updateModel([startDate, endDate]);
|
408
|
+
}
|
409
|
+
else {
|
410
|
+
this.updateModel([date, null]);
|
411
|
+
}
|
285
412
|
}
|
286
|
-
this.
|
287
|
-
this.updateModel();
|
288
|
-
this.onSelect.emit(this.value);
|
413
|
+
this.onSelect.emit(date);
|
289
414
|
};
|
290
|
-
Calendar.prototype.updateModel = function () {
|
291
|
-
|
415
|
+
Calendar.prototype.updateModel = function (value) {
|
416
|
+
this.value = value;
|
417
|
+
if (this.dataType == 'date')
|
292
418
|
this.onModelChange(this.value);
|
293
|
-
|
294
|
-
|
295
|
-
if (this.timeOnly)
|
296
|
-
this.onModelChange(this.formatTime(this.value));
|
297
|
-
else
|
298
|
-
this.onModelChange(this.formatDate(this.value, this.dateFormat));
|
299
|
-
}
|
419
|
+
else if (this.dataType == 'string')
|
420
|
+
this.onModelChange(this.formatDateTime(this.value));
|
300
421
|
};
|
301
422
|
Calendar.prototype.getFirstDayOfMonthIndex = function (month, year) {
|
302
423
|
var day = new Date();
|
@@ -341,11 +462,55 @@ var Calendar = (function () {
|
|
341
462
|
return this.locale.firstDayOfWeek > 0 ? 7 - this.locale.firstDayOfWeek : 0;
|
342
463
|
};
|
343
464
|
Calendar.prototype.isSelected = function (dateMeta) {
|
344
|
-
if (this.value)
|
345
|
-
|
465
|
+
if (this.value) {
|
466
|
+
if (this.isSingleSelection()) {
|
467
|
+
return this.isDateEquals(this.value, dateMeta);
|
468
|
+
}
|
469
|
+
else if (this.isMultipleSelection()) {
|
470
|
+
var selected = false;
|
471
|
+
for (var _i = 0, _a = this.value; _i < _a.length; _i++) {
|
472
|
+
var date = _a[_i];
|
473
|
+
selected = this.isDateEquals(date, dateMeta);
|
474
|
+
if (selected) {
|
475
|
+
break;
|
476
|
+
}
|
477
|
+
}
|
478
|
+
return selected;
|
479
|
+
}
|
480
|
+
else if (this.isRangeSelection()) {
|
481
|
+
if (this.value[1])
|
482
|
+
return this.isDateEquals(this.value[0], dateMeta) || this.isDateEquals(this.value[1], dateMeta) || this.isDateBetween(this.value[0], this.value[1], dateMeta);
|
483
|
+
else
|
484
|
+
return this.isDateEquals(this.value[0], dateMeta);
|
485
|
+
}
|
486
|
+
}
|
346
487
|
else
|
347
488
|
return false;
|
348
489
|
};
|
490
|
+
Calendar.prototype.isDateEquals = function (value, dateMeta) {
|
491
|
+
if (value)
|
492
|
+
return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;
|
493
|
+
else
|
494
|
+
return false;
|
495
|
+
};
|
496
|
+
Calendar.prototype.isDateBetween = function (start, end, dateMeta) {
|
497
|
+
if (start && end) {
|
498
|
+
return start.getDate() < dateMeta.day && start.getMonth() <= dateMeta.month && start.getFullYear() <= dateMeta.year &&
|
499
|
+
end.getDate() > dateMeta.day && end.getMonth() >= dateMeta.month && end.getFullYear() >= dateMeta.year;
|
500
|
+
}
|
501
|
+
else {
|
502
|
+
return false;
|
503
|
+
}
|
504
|
+
};
|
505
|
+
Calendar.prototype.isSingleSelection = function () {
|
506
|
+
return this.selectionMode === 'single';
|
507
|
+
};
|
508
|
+
Calendar.prototype.isRangeSelection = function () {
|
509
|
+
return this.selectionMode === 'range';
|
510
|
+
};
|
511
|
+
Calendar.prototype.isMultipleSelection = function () {
|
512
|
+
return this.selectionMode === 'multiple';
|
513
|
+
};
|
349
514
|
Calendar.prototype.isToday = function (today, day, month, year) {
|
350
515
|
return today.getDate() === day && today.getMonth() === month && today.getFullYear() === year;
|
351
516
|
};
|
@@ -425,13 +590,13 @@ var Calendar = (function () {
|
|
425
590
|
this.onModelTouched();
|
426
591
|
};
|
427
592
|
Calendar.prototype.onButtonClick = function (event, inputfield) {
|
428
|
-
this.closeOverlay = false;
|
429
593
|
if (!this.overlayViewChild.nativeElement.offsetParent || this.overlayViewChild.nativeElement.style.display === 'none') {
|
430
594
|
inputfield.focus();
|
431
595
|
this.showOverlay();
|
432
596
|
}
|
433
597
|
else
|
434
|
-
this.
|
598
|
+
this.overlayVisible = false;
|
599
|
+
this.datepickerClick = true;
|
435
600
|
};
|
436
601
|
Calendar.prototype.onInputKeydown = function (event) {
|
437
602
|
this.isKeydown = true;
|
@@ -490,15 +655,15 @@ var Calendar = (function () {
|
|
490
655
|
event.preventDefault();
|
491
656
|
};
|
492
657
|
Calendar.prototype.updateTime = function () {
|
493
|
-
|
658
|
+
var value = this.value || new Date();
|
494
659
|
if (this.hourFormat === '12' && this.pm && this.currentHour != 12)
|
495
|
-
|
660
|
+
value.setHours(this.currentHour + 12);
|
496
661
|
else
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
this.updateModel();
|
501
|
-
this.onSelect.emit(
|
662
|
+
value.setHours(this.currentHour);
|
663
|
+
value.setMinutes(this.currentMinute);
|
664
|
+
value.setSeconds(this.currentSecond);
|
665
|
+
this.updateModel(value);
|
666
|
+
this.onSelect.emit(value);
|
502
667
|
this.updateInputfield();
|
503
668
|
};
|
504
669
|
Calendar.prototype.toggleAMPM = function (event) {
|
@@ -514,39 +679,59 @@ var Calendar = (function () {
|
|
514
679
|
this.isKeydown = false;
|
515
680
|
var val = event.target.value;
|
516
681
|
try {
|
517
|
-
|
682
|
+
var value = this.parseValueFromString(val);
|
683
|
+
this.updateModel(value);
|
518
684
|
this.updateUI();
|
519
|
-
this._isValid = true;
|
520
685
|
}
|
521
686
|
catch (err) {
|
522
687
|
//invalid date
|
523
|
-
this.
|
524
|
-
this._isValid = false;
|
688
|
+
this.updateModel(null);
|
525
689
|
}
|
526
690
|
this.filled = val != null && val.length;
|
527
|
-
this.updateModel();
|
528
691
|
this.onInput.emit(event);
|
529
692
|
};
|
530
693
|
Calendar.prototype.parseValueFromString = function (text) {
|
531
694
|
if (!text || text.trim().length === 0) {
|
532
695
|
return null;
|
533
696
|
}
|
534
|
-
var
|
697
|
+
var value;
|
698
|
+
if (this.isSingleSelection()) {
|
699
|
+
value = this.parseDateTime(text);
|
700
|
+
}
|
701
|
+
else if (this.isMultipleSelection()) {
|
702
|
+
var tokens = text.split(',');
|
703
|
+
value = [];
|
704
|
+
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
705
|
+
var token = tokens_1[_i];
|
706
|
+
value.push(this.parseDateTime(token.trim()));
|
707
|
+
}
|
708
|
+
}
|
709
|
+
else if (this.isRangeSelection()) {
|
710
|
+
var tokens = text.split(' - ');
|
711
|
+
value = [];
|
712
|
+
for (var i = 0; i < tokens.length; i++) {
|
713
|
+
value[i] = this.parseDateTime(tokens[i].trim());
|
714
|
+
}
|
715
|
+
}
|
716
|
+
return value;
|
717
|
+
};
|
718
|
+
Calendar.prototype.parseDateTime = function (text) {
|
719
|
+
var date;
|
535
720
|
var parts = text.split(' ');
|
536
721
|
if (this.timeOnly) {
|
537
|
-
|
538
|
-
this.populateTime(
|
722
|
+
date = new Date();
|
723
|
+
this.populateTime(date, parts[0], parts[1]);
|
539
724
|
}
|
540
725
|
else {
|
541
726
|
if (this.showTime) {
|
542
|
-
|
543
|
-
this.populateTime(
|
727
|
+
date = this.parseDate(parts[0], this.dateFormat);
|
728
|
+
this.populateTime(date, parts[1], parts[2]);
|
544
729
|
}
|
545
730
|
else {
|
546
|
-
|
731
|
+
date = this.parseDate(text, this.dateFormat);
|
547
732
|
}
|
548
733
|
}
|
549
|
-
return
|
734
|
+
return date;
|
550
735
|
};
|
551
736
|
Calendar.prototype.populateTime = function (value, timeString, ampm) {
|
552
737
|
if (this.hourFormat == '12' && !ampm) {
|
@@ -579,7 +764,7 @@ var Calendar = (function () {
|
|
579
764
|
}
|
580
765
|
};
|
581
766
|
Calendar.prototype.onDatePickerClick = function (event) {
|
582
|
-
this.
|
767
|
+
this.datepickerClick = true;
|
583
768
|
};
|
584
769
|
Calendar.prototype.showOverlay = function () {
|
585
770
|
this.overlayVisible = true;
|
@@ -871,16 +1056,27 @@ var Calendar = (function () {
|
|
871
1056
|
Calendar.prototype.updateFilledState = function () {
|
872
1057
|
this.filled = this.inputFieldValue && this.inputFieldValue != '';
|
873
1058
|
};
|
1059
|
+
Calendar.prototype.onTodayButtonClick = function (event) {
|
1060
|
+
var date = new Date();
|
1061
|
+
var dateMeta = { day: date.getDate(), month: date.getMonth(), year: date.getFullYear(), today: true, selectable: true };
|
1062
|
+
this.onDateSelect(event, dateMeta);
|
1063
|
+
this.onTodayClick.emit(event);
|
1064
|
+
};
|
1065
|
+
Calendar.prototype.onClearButtonClick = function (event) {
|
1066
|
+
this.updateModel(null);
|
1067
|
+
this.updateInputfield();
|
1068
|
+
this.overlayVisible = false;
|
1069
|
+
this.onClearClick.emit(event);
|
1070
|
+
};
|
874
1071
|
Calendar.prototype.bindDocumentClickListener = function () {
|
875
1072
|
var _this = this;
|
876
1073
|
if (!this.documentClickListener) {
|
877
1074
|
this.documentClickListener = this.renderer.listen('document', 'click', function (event) {
|
878
|
-
if (_this.
|
1075
|
+
if (!_this.datepickerClick && _this.overlayVisible) {
|
879
1076
|
_this.overlayVisible = false;
|
880
1077
|
_this.onClose.emit(event);
|
881
1078
|
}
|
882
|
-
_this.
|
883
|
-
_this.dateClick = false;
|
1079
|
+
_this.datepickerClick = false;
|
884
1080
|
_this.cd.detectChanges();
|
885
1081
|
});
|
886
1082
|
}
|
@@ -897,12 +1093,6 @@ var Calendar = (function () {
|
|
897
1093
|
this.el.nativeElement.appendChild(this.overlayViewChild.nativeElement);
|
898
1094
|
}
|
899
1095
|
};
|
900
|
-
Calendar.prototype.validate = function (c) {
|
901
|
-
if (!this._isValid) {
|
902
|
-
return { invalidDate: true };
|
903
|
-
}
|
904
|
-
return null;
|
905
|
-
};
|
906
1096
|
return Calendar;
|
907
1097
|
}());
|
908
1098
|
__decorate([
|
@@ -925,6 +1115,10 @@ __decorate([
|
|
925
1115
|
core_1.Input(),
|
926
1116
|
__metadata("design:type", String)
|
927
1117
|
], Calendar.prototype, "inputId", void 0);
|
1118
|
+
__decorate([
|
1119
|
+
core_1.Input(),
|
1120
|
+
__metadata("design:type", String)
|
1121
|
+
], Calendar.prototype, "name", void 0);
|
928
1122
|
__decorate([
|
929
1123
|
core_1.Input(),
|
930
1124
|
__metadata("design:type", String)
|
@@ -985,10 +1179,6 @@ __decorate([
|
|
985
1179
|
core_1.Input(),
|
986
1180
|
__metadata("design:type", String)
|
987
1181
|
], Calendar.prototype, "yearRange", void 0);
|
988
|
-
__decorate([
|
989
|
-
core_1.Input(),
|
990
|
-
__metadata("design:type", Boolean)
|
991
|
-
], Calendar.prototype, "showTime", void 0);
|
992
1182
|
__decorate([
|
993
1183
|
core_1.Input(),
|
994
1184
|
__metadata("design:type", String)
|
@@ -1027,16 +1217,28 @@ __decorate([
|
|
1027
1217
|
], Calendar.prototype, "dataType", void 0);
|
1028
1218
|
__decorate([
|
1029
1219
|
core_1.Input(),
|
1030
|
-
__metadata("design:type",
|
1031
|
-
], Calendar.prototype, "
|
1220
|
+
__metadata("design:type", Boolean)
|
1221
|
+
], Calendar.prototype, "utc", void 0);
|
1222
|
+
__decorate([
|
1223
|
+
core_1.Input(),
|
1224
|
+
__metadata("design:type", String)
|
1225
|
+
], Calendar.prototype, "selectionMode", void 0);
|
1032
1226
|
__decorate([
|
1033
1227
|
core_1.Input(),
|
1034
|
-
__metadata("design:type",
|
1035
|
-
], Calendar.prototype, "
|
1228
|
+
__metadata("design:type", Number)
|
1229
|
+
], Calendar.prototype, "maxDateCount", void 0);
|
1036
1230
|
__decorate([
|
1037
1231
|
core_1.Input(),
|
1038
1232
|
__metadata("design:type", Boolean)
|
1039
|
-
], Calendar.prototype, "
|
1233
|
+
], Calendar.prototype, "showButtonBar", void 0);
|
1234
|
+
__decorate([
|
1235
|
+
core_1.Input(),
|
1236
|
+
__metadata("design:type", String)
|
1237
|
+
], Calendar.prototype, "todayButtonStyleClass", void 0);
|
1238
|
+
__decorate([
|
1239
|
+
core_1.Input(),
|
1240
|
+
__metadata("design:type", String)
|
1241
|
+
], Calendar.prototype, "clearButtonStyleClass", void 0);
|
1040
1242
|
__decorate([
|
1041
1243
|
core_1.Output(),
|
1042
1244
|
__metadata("design:type", core_1.EventEmitter)
|
@@ -1057,6 +1259,18 @@ __decorate([
|
|
1057
1259
|
core_1.Output(),
|
1058
1260
|
__metadata("design:type", core_1.EventEmitter)
|
1059
1261
|
], Calendar.prototype, "onInput", void 0);
|
1262
|
+
__decorate([
|
1263
|
+
core_1.Output(),
|
1264
|
+
__metadata("design:type", core_1.EventEmitter)
|
1265
|
+
], Calendar.prototype, "onTodayClick", void 0);
|
1266
|
+
__decorate([
|
1267
|
+
core_1.Output(),
|
1268
|
+
__metadata("design:type", core_1.EventEmitter)
|
1269
|
+
], Calendar.prototype, "onClearClick", void 0);
|
1270
|
+
__decorate([
|
1271
|
+
core_1.ContentChildren(shared_1.PrimeTemplate),
|
1272
|
+
__metadata("design:type", core_1.QueryList)
|
1273
|
+
], Calendar.prototype, "templates", void 0);
|
1060
1274
|
__decorate([
|
1061
1275
|
core_1.Input(),
|
1062
1276
|
__metadata("design:type", Number)
|
@@ -1079,6 +1293,21 @@ __decorate([
|
|
1079
1293
|
__metadata("design:type", Date),
|
1080
1294
|
__metadata("design:paramtypes", [Date])
|
1081
1295
|
], Calendar.prototype, "maxDate", null);
|
1296
|
+
__decorate([
|
1297
|
+
core_1.Input(),
|
1298
|
+
__metadata("design:type", Array),
|
1299
|
+
__metadata("design:paramtypes", [Array])
|
1300
|
+
], Calendar.prototype, "disabledDates", null);
|
1301
|
+
__decorate([
|
1302
|
+
core_1.Input(),
|
1303
|
+
__metadata("design:type", Array),
|
1304
|
+
__metadata("design:paramtypes", [Array])
|
1305
|
+
], Calendar.prototype, "disabledDays", null);
|
1306
|
+
__decorate([
|
1307
|
+
core_1.Input(),
|
1308
|
+
__metadata("design:type", Boolean),
|
1309
|
+
__metadata("design:paramtypes", [Boolean])
|
1310
|
+
], Calendar.prototype, "showTime", null);
|
1082
1311
|
__decorate([
|
1083
1312
|
core_1.Input(),
|
1084
1313
|
__metadata("design:type", Object),
|
@@ -1087,7 +1316,7 @@ __decorate([
|
|
1087
1316
|
Calendar = __decorate([
|
1088
1317
|
core_1.Component({
|
1089
1318
|
selector: 'p-calendar',
|
1090
|
-
template: "\n <span [ngClass]=\"{'ui-calendar':true,'ui-calendar-w-btn':showIcon}\" [ngStyle]=\"style\" [class]=\"styleClass\">\n <ng-template [ngIf]=\"!inline\">\n <input #inputfield type=\"text\" [attr.id]=\"inputId\" [attr.required]=\"required\" [value]=\"inputFieldValue\" (focus)=\"onInputFocus($event)\" (keydown)=\"onInputKeydown($event)\" (click)=\"
|
1319
|
+
template: "\n <span [ngClass]=\"{'ui-calendar':true,'ui-calendar-w-btn':showIcon}\" [ngStyle]=\"style\" [class]=\"styleClass\">\n <ng-template [ngIf]=\"!inline\">\n <input #inputfield type=\"text\" [attr.id]=\"inputId\" [attr.name]=\"name\" [attr.required]=\"required\" [value]=\"inputFieldValue\" (focus)=\"onInputFocus($event)\" (keydown)=\"onInputKeydown($event)\" (click)=\"datepickerClick=true\" (blur)=\"onInputBlur($event)\"\n [readonly]=\"readonlyInput\" (input)=\"onUserInput($event)\" [ngStyle]=\"inputStyle\" [class]=\"inputStyleClass\" [placeholder]=\"placeholder||''\" [disabled]=\"disabled\" [attr.tabindex]=\"tabindex\"\n [ngClass]=\"'ui-inputtext ui-widget ui-state-default ui-corner-all'\"\n ><button type=\"button\" [icon]=\"icon\" pButton *ngIf=\"showIcon\" (click)=\"onButtonClick($event,inputfield)\" class=\"ui-datepicker-trigger ui-calendar-button\"\n [ngClass]=\"{'ui-state-disabled':disabled}\" [disabled]=\"disabled\" tabindex=\"-1\"></button>\n </ng-template>\n <div #datepicker class=\"ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all\" [ngClass]=\"{'ui-datepicker-inline':inline,'ui-shadow':!inline,'ui-state-disabled':disabled,'ui-datepicker-timeonly':timeOnly}\" \n [ngStyle]=\"{'display': inline ? 'inline-block' : (overlayVisible ? 'block' : 'none')}\" (click)=\"onDatePickerClick($event)\" [@overlayState]=\"inline ? 'visible' : (overlayVisible ? 'visible' : 'hidden')\">\n\n <div class=\"ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all\" *ngIf=\"!timeOnly && (overlayVisible || inline)\">\n <ng-content select=\"p-header\"></ng-content>\n <a class=\"ui-datepicker-prev ui-corner-all\" href=\"#\" (click)=\"prevMonth($event)\">\n <span class=\"fa fa-angle-left\"></span>\n </a>\n <a class=\"ui-datepicker-next ui-corner-all\" href=\"#\" (click)=\"nextMonth($event)\">\n <span class=\"fa fa-angle-right\"></span>\n </a>\n <div class=\"ui-datepicker-title\">\n <span class=\"ui-datepicker-month\" *ngIf=\"!monthNavigator\">{{locale.monthNames[currentMonth]}}</span>\n <select class=\"ui-datepicker-month\" *ngIf=\"monthNavigator\" (change)=\"onMonthDropdownChange($event.target.value)\">\n <option [value]=\"i\" *ngFor=\"let month of locale.monthNames;let i = index\" [selected]=\"i == currentMonth\">{{month}}</option>\n </select>\n <select class=\"ui-datepicker-year\" *ngIf=\"yearNavigator\" (change)=\"onYearDropdownChange($event.target.value)\">\n <option [value]=\"year\" *ngFor=\"let year of yearOptions\" [selected]=\"year == currentYear\">{{year}}</option>\n </select>\n <span class=\"ui-datepicker-year\" *ngIf=\"!yearNavigator\">{{currentYear}}</span>\n </div>\n </div>\n <table class=\"ui-datepicker-calendar\" *ngIf=\"!timeOnly && (overlayVisible || inline)\">\n <thead>\n <tr>\n <th scope=\"col\" *ngFor=\"let weekDay of weekDays;let begin = first; let end = last\">\n <span>{{weekDay}}</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let week of dates\">\n <td *ngFor=\"let date of week\" [ngClass]=\"{'ui-datepicker-other-month ui-state-disabled':date.otherMonth,\n 'ui-datepicker-current-day':isSelected(date),'ui-datepicker-today':date.today}\">\n <a class=\"ui-state-default\" href=\"#\" *ngIf=\"date.otherMonth ? showOtherMonths : true\" \n [ngClass]=\"{'ui-state-active':isSelected(date), 'ui-state-highlight':date.today, 'ui-state-disabled':!date.selectable}\"\n (click)=\"onDateSelect($event,date)\">\n <span *ngIf=\"!dateTemplate\">{{date.day}}</span>\n <ng-template [pTemplateWrapper]=\"dateTemplate\" [item]=\"date\" *ngIf=\"dateTemplate\"></ng-template>\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"ui-timepicker ui-widget-header ui-corner-all\" *ngIf=\"showTime||timeOnly\">\n <div class=\"ui-hour-picker\">\n <a href=\"#\" (click)=\"incrementHour($event)\">\n <span class=\"fa fa-angle-up\"></span>\n </a>\n <span [ngStyle]=\"{'display': currentHour < 10 ? 'inline': 'none'}\">0</span><span>{{currentHour}}</span>\n <a href=\"#\" (click)=\"decrementHour($event)\">\n <span class=\"fa fa-angle-down\"></span>\n </a>\n </div>\n <div class=\"ui-separator\">\n <a href=\"#\">\n <span class=\"fa fa-angle-up\"></span>\n </a>\n <span>:</span>\n <a href=\"#\">\n <span class=\"fa fa-angle-down\"></span>\n </a>\n </div>\n <div class=\"ui-minute-picker\">\n <a href=\"#\" (click)=\"incrementMinute($event)\">\n <span class=\"fa fa-angle-up\"></span>\n </a>\n <span [ngStyle]=\"{'display': currentMinute < 10 ? 'inline': 'none'}\">0</span><span>{{currentMinute}}</span>\n <a href=\"#\" (click)=\"decrementMinute($event)\">\n <span class=\"fa fa-angle-down\"></span>\n </a>\n </div>\n <div class=\"ui-separator\" *ngIf=\"showSeconds\">\n <a href=\"#\">\n <span class=\"fa fa-angle-up\"></span>\n </a>\n <span>:</span>\n <a href=\"#\">\n <span class=\"fa fa-angle-down\"></span>\n </a>\n </div>\n <div class=\"ui-second-picker\" *ngIf=\"showSeconds\">\n <a href=\"#\" (click)=\"incrementSecond($event)\">\n <span class=\"fa fa-angle-up\"></span>\n </a>\n <span [ngStyle]=\"{'display': currentSecond < 10 ? 'inline': 'none'}\">0</span><span>{{currentSecond}}</span>\n <a href=\"#\" (click)=\"decrementSecond($event)\">\n <span class=\"fa fa-angle-down\"></span>\n </a>\n </div>\n <div class=\"ui-ampm-picker\" *ngIf=\"hourFormat=='12'\">\n <a href=\"#\" (click)=\"toggleAMPM($event)\">\n <span class=\"fa fa-angle-up\"></span>\n </a>\n <span>{{pm ? 'PM' : 'AM'}}</span>\n <a href=\"#\" (click)=\"toggleAMPM($event)\">\n <span class=\"fa fa-angle-down\"></span>\n </a>\n </div>\n </div>\n <div class=\"ui-datepicker-buttonbar ui-widget-header\" *ngIf=\"showButtonBar\">\n <div class=\"ui-g\">\n <div class=\"ui-g-6\">\n <button type=\"button\" [label]=\"_locale.today\" (click)=\"onTodayButtonClick($event)\" pButton [ngClass]=\"[todayButtonStyleClass]\"></button>\n </div>\n <div class=\"ui-g-6\">\n <button type=\"button\" [label]=\"_locale.clear\" (click)=\"onClearButtonClick($event)\" pButton [ngClass]=\"[clearButtonStyleClass]\"></button>\n </div>\n </div>\n </div>\n <ng-content select=\"p-footer\"></ng-content>\n </div>\n </span>\n ",
|
1091
1320
|
animations: [
|
1092
1321
|
animations_1.trigger('overlayState', [
|
1093
1322
|
animations_1.state('hidden', animations_1.style({
|
@@ -1104,7 +1333,7 @@ Calendar = __decorate([
|
|
1104
1333
|
'[class.ui-inputwrapper-filled]': 'filled',
|
1105
1334
|
'[class.ui-inputwrapper-focus]': 'focus'
|
1106
1335
|
},
|
1107
|
-
providers: [domhandler_1.DomHandler, exports.CALENDAR_VALUE_ACCESSOR
|
1336
|
+
providers: [domhandler_1.DomHandler, exports.CALENDAR_VALUE_ACCESSOR]
|
1108
1337
|
}),
|
1109
1338
|
__metadata("design:paramtypes", [core_1.ElementRef, domhandler_1.DomHandler, core_1.Renderer2, core_1.ChangeDetectorRef])
|
1110
1339
|
], Calendar);
|
@@ -1116,8 +1345,8 @@ var CalendarModule = (function () {
|
|
1116
1345
|
}());
|
1117
1346
|
CalendarModule = __decorate([
|
1118
1347
|
core_1.NgModule({
|
1119
|
-
imports: [common_1.CommonModule, button_1.ButtonModule],
|
1120
|
-
exports: [Calendar, button_1.ButtonModule],
|
1348
|
+
imports: [common_1.CommonModule, button_1.ButtonModule, shared_1.SharedModule],
|
1349
|
+
exports: [Calendar, button_1.ButtonModule, shared_1.SharedModule],
|
1121
1350
|
declarations: [Calendar]
|
1122
1351
|
})
|
1123
1352
|
], CalendarModule);
|