@syncfusion/ej2-calendars 21.2.8 → 21.2.10
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/CHANGELOG.md +2 -0
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +19 -14
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +21 -15
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +10 -10
- package/src/calendar/calendar.js +2 -2
- package/src/datepicker/datepicker.d.ts +2 -1
- package/src/datepicker/datepicker.js +11 -6
- package/src/maskbase/masked-date-time.d.ts +2 -0
- package/src/maskbase/masked-date-time.js +7 -4
- package/src/timepicker/timepicker.js +1 -3
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.2.
|
|
3
|
+
* version : 21.2.10
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-calendars@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-calendars@21.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-calendars@21.2.9",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-hEe0pY/d+LA4Nh3/iHYsKuOMc+H6WDWxjiiWapfTOYE3+FwoqRlWcb60IvVtmdvGFdYbAh+5EJENzvoF1PlBaA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-calendars",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"/@syncfusion/ej2-schedule",
|
|
33
33
|
"/@syncfusion/ej2-vue-calendars"
|
|
34
34
|
],
|
|
35
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-21.2.
|
|
36
|
-
"_shasum": "
|
|
35
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-21.2.9.tgz",
|
|
36
|
+
"_shasum": "03c2e601ebb2ddbfbbfdb817755ad7a334c71907",
|
|
37
37
|
"_spec": "@syncfusion/ej2-calendars@*",
|
|
38
38
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
39
39
|
"author": {
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
},
|
|
45
45
|
"bundleDependencies": false,
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@syncfusion/ej2-base": "~21.2.
|
|
48
|
-
"@syncfusion/ej2-buttons": "~21.2.
|
|
49
|
-
"@syncfusion/ej2-inputs": "~21.2.
|
|
50
|
-
"@syncfusion/ej2-lists": "~21.2.
|
|
51
|
-
"@syncfusion/ej2-popups": "~21.2.
|
|
47
|
+
"@syncfusion/ej2-base": "~21.2.9",
|
|
48
|
+
"@syncfusion/ej2-buttons": "~21.2.10",
|
|
49
|
+
"@syncfusion/ej2-inputs": "~21.2.9",
|
|
50
|
+
"@syncfusion/ej2-lists": "~21.2.9",
|
|
51
|
+
"@syncfusion/ej2-popups": "~21.2.10"
|
|
52
52
|
},
|
|
53
53
|
"deprecated": false,
|
|
54
54
|
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
82
82
|
},
|
|
83
83
|
"typings": "index.d.ts",
|
|
84
|
-
"version": "21.2.
|
|
84
|
+
"version": "21.2.10",
|
|
85
85
|
"sideEffects": false
|
|
86
86
|
}
|
package/src/calendar/calendar.js
CHANGED
|
@@ -1602,10 +1602,10 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1602
1602
|
* @returns {string}
|
|
1603
1603
|
*/
|
|
1604
1604
|
CalendarBase.prototype.currentView = function () {
|
|
1605
|
-
if (this.contentElement.classList.contains(YEAR)) {
|
|
1605
|
+
if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(YEAR)) {
|
|
1606
1606
|
return 'Year';
|
|
1607
1607
|
}
|
|
1608
|
-
else if (this.contentElement.classList.contains(DECADE)) {
|
|
1608
|
+
else if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(DECADE)) {
|
|
1609
1609
|
return 'Decade';
|
|
1610
1610
|
}
|
|
1611
1611
|
else {
|
|
@@ -63,6 +63,7 @@ export declare class DatePicker extends Calendar implements IInput {
|
|
|
63
63
|
protected isDynamicValueChanged: boolean;
|
|
64
64
|
protected moduleName: string;
|
|
65
65
|
protected isFocused: boolean;
|
|
66
|
+
protected isBlur: boolean;
|
|
66
67
|
/**
|
|
67
68
|
* Specifies the width of the DatePicker component.
|
|
68
69
|
*
|
|
@@ -399,7 +400,7 @@ export declare class DatePicker extends Calendar implements IInput {
|
|
|
399
400
|
protected updateIconState(): void;
|
|
400
401
|
private initialize;
|
|
401
402
|
private createInput;
|
|
402
|
-
protected updateInput(isDynamic?: boolean): void;
|
|
403
|
+
protected updateInput(isDynamic?: boolean, isBlur?: boolean): void;
|
|
403
404
|
protected minMaxUpdates(): void;
|
|
404
405
|
private checkStringValue;
|
|
405
406
|
protected checkInvalidValue(value: Date): void;
|
|
@@ -85,6 +85,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
85
85
|
_this.isDynamicValueChanged = false;
|
|
86
86
|
_this.moduleName = _this.getModuleName();
|
|
87
87
|
_this.isFocused = false;
|
|
88
|
+
_this.isBlur = false;
|
|
88
89
|
_this.datepickerOptions = options;
|
|
89
90
|
return _this;
|
|
90
91
|
}
|
|
@@ -218,11 +219,12 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
218
219
|
Input.addAttributes({ 'aria-label': 'select' }, this.inputWrapper.buttons[0]);
|
|
219
220
|
addClass([this.inputWrapper.container], DATEWRAPPER);
|
|
220
221
|
};
|
|
221
|
-
DatePicker.prototype.updateInput = function (isDynamic) {
|
|
222
|
+
DatePicker.prototype.updateInput = function (isDynamic, isBlur) {
|
|
222
223
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
224
|
+
if (isBlur === void 0) { isBlur = false; }
|
|
223
225
|
var formatOptions;
|
|
224
226
|
if (this.value && !this.isCalendar()) {
|
|
225
|
-
this.disabledDates(isDynamic);
|
|
227
|
+
this.disabledDates(isDynamic, isBlur);
|
|
226
228
|
}
|
|
227
229
|
if (isNaN(+new Date(this.checkValue(this.value)))) {
|
|
228
230
|
this.setProperties({ value: null }, true);
|
|
@@ -705,7 +707,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
705
707
|
this.invalidValueString = null;
|
|
706
708
|
this.updateInputValue('');
|
|
707
709
|
}
|
|
708
|
-
this.
|
|
710
|
+
this.isBlur = true;
|
|
711
|
+
this.updateInput(false, true);
|
|
712
|
+
this.isBlur = false;
|
|
709
713
|
this.popupUpdate();
|
|
710
714
|
this.changeTrigger(e);
|
|
711
715
|
if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {
|
|
@@ -1089,7 +1093,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1089
1093
|
this.trigger('navigated', this.navigatedArgs);
|
|
1090
1094
|
};
|
|
1091
1095
|
DatePicker.prototype.changeEvent = function (event) {
|
|
1092
|
-
if (!this.isIconClicked) {
|
|
1096
|
+
if (!this.isIconClicked && !this.isBlur) {
|
|
1093
1097
|
this.selectCalendar(event);
|
|
1094
1098
|
}
|
|
1095
1099
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -1663,8 +1667,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1663
1667
|
DatePicker.prototype.getModuleName = function () {
|
|
1664
1668
|
return 'datepicker';
|
|
1665
1669
|
};
|
|
1666
|
-
DatePicker.prototype.disabledDates = function (isDynamic) {
|
|
1670
|
+
DatePicker.prototype.disabledDates = function (isDynamic, isBlur) {
|
|
1667
1671
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
1672
|
+
if (isBlur === void 0) { isBlur = false; }
|
|
1668
1673
|
var formatOptions;
|
|
1669
1674
|
var globalize;
|
|
1670
1675
|
var valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));
|
|
@@ -1719,7 +1724,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1719
1724
|
if (this.enableMask) {
|
|
1720
1725
|
this.updateInputValue(this.maskedDateValue);
|
|
1721
1726
|
this.notify('createMask', {
|
|
1722
|
-
module: 'MaskedDateTime'
|
|
1727
|
+
module: 'MaskedDateTime', isBlur: isBlur
|
|
1723
1728
|
});
|
|
1724
1729
|
}
|
|
1725
1730
|
}
|
|
@@ -27,6 +27,7 @@ export declare class MaskedDateTime {
|
|
|
27
27
|
private previousDate;
|
|
28
28
|
private isNavigate;
|
|
29
29
|
private navigated;
|
|
30
|
+
private isBlur;
|
|
30
31
|
private formatRegex;
|
|
31
32
|
private isDeletion;
|
|
32
33
|
private isShortYear;
|
|
@@ -67,4 +68,5 @@ export declare class MaskedDateTime {
|
|
|
67
68
|
export interface events {
|
|
68
69
|
module: string;
|
|
69
70
|
e: KeyboardEventArgs;
|
|
71
|
+
isBlur: boolean;
|
|
70
72
|
}
|
|
@@ -34,6 +34,7 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
34
34
|
this.isComplete = false;
|
|
35
35
|
this.isNavigate = false;
|
|
36
36
|
this.navigated = false;
|
|
37
|
+
this.isBlur = false;
|
|
37
38
|
this.formatRegex = /EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;
|
|
38
39
|
this.isDeletion = false;
|
|
39
40
|
this.isShortYear = false;
|
|
@@ -80,8 +81,7 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
80
81
|
this.parent.off('keyDownHandler', this.maskKeydownHandler);
|
|
81
82
|
this.parent.off('clearHandler', this.clearHandler);
|
|
82
83
|
};
|
|
83
|
-
MaskedDateTime.prototype.createMask = function (
|
|
84
|
-
if (navigated === void 0) { navigated = false; }
|
|
84
|
+
MaskedDateTime.prototype.createMask = function (mask) {
|
|
85
85
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;
|
|
86
86
|
this.dateformat = this.getCulturedFormat();
|
|
87
87
|
if (this.parent.maskPlaceholder.day) {
|
|
@@ -114,7 +114,8 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
114
114
|
this.mask = this.previousValue = inputValue;
|
|
115
115
|
this.parent.maskedDateValue = this.mask;
|
|
116
116
|
if (this.parent.value) {
|
|
117
|
-
this.navigated =
|
|
117
|
+
this.navigated = true;
|
|
118
|
+
this.isBlur = mask.isBlur;
|
|
118
119
|
this.setDynamicValue();
|
|
119
120
|
}
|
|
120
121
|
};
|
|
@@ -143,7 +144,9 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
143
144
|
this.maskDateValue = new Date(+this.parent.value);
|
|
144
145
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = true;
|
|
145
146
|
this.updateValue();
|
|
146
|
-
this.
|
|
147
|
+
if (!this.isBlur) {
|
|
148
|
+
this.validCharacterCheck();
|
|
149
|
+
}
|
|
147
150
|
};
|
|
148
151
|
MaskedDateTime.prototype.setSelection = function (validChar) {
|
|
149
152
|
var start = -1;
|
|
@@ -1138,9 +1138,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
1138
1138
|
if (this.isValidLI(li)) {
|
|
1139
1139
|
this.checkValue(li.getAttribute('data-value'));
|
|
1140
1140
|
if (this.enableMask) {
|
|
1141
|
-
this.
|
|
1142
|
-
module: 'MaskedDateTime', navigated: true
|
|
1143
|
-
});
|
|
1141
|
+
this.createMask();
|
|
1144
1142
|
}
|
|
1145
1143
|
this.selectedElement = li;
|
|
1146
1144
|
this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);
|