@syncfusion/ej2-calendars 27.1.51 → 27.1.52
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/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 +32 -5
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +32 -5
- 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 +6 -6
- package/src/datepicker/datepicker.js +11 -4
- package/src/maskbase/masked-date-time.d.ts +2 -0
- package/src/maskbase/masked-date-time.js +21 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 27.1.
|
|
3
|
+
* version : 27.1.52
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@27.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-calendars@27.1.51",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-46rnTrdhdnUUIXd6IlylzsnHHsihlRv8lSTBeRTHYrRfPyW+sR0HQtqh2Sy79f+hUyrTz0NN4o4irXimzo8w7A==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-calendars",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"/@syncfusion/ej2-schedule",
|
|
32
32
|
"/@syncfusion/ej2-vue-calendars"
|
|
33
33
|
],
|
|
34
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-27.1.
|
|
35
|
-
"_shasum": "
|
|
34
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-27.1.51.tgz",
|
|
35
|
+
"_shasum": "02916eff14ef8c43e29a4616e5fe7507f78ff790",
|
|
36
36
|
"_spec": "@syncfusion/ej2-calendars@*",
|
|
37
37
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
38
38
|
"author": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~27.1.
|
|
46
|
+
"@syncfusion/ej2-base": "~27.1.52",
|
|
47
47
|
"@syncfusion/ej2-buttons": "~27.1.51",
|
|
48
48
|
"@syncfusion/ej2-inputs": "~27.1.50",
|
|
49
49
|
"@syncfusion/ej2-lists": "~27.1.50",
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
81
81
|
},
|
|
82
82
|
"typings": "index.d.ts",
|
|
83
|
-
"version": "27.1.
|
|
83
|
+
"version": "27.1.52",
|
|
84
84
|
"sideEffects": false
|
|
85
85
|
}
|
|
@@ -699,12 +699,19 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
699
699
|
this.show();
|
|
700
700
|
}
|
|
701
701
|
};
|
|
702
|
-
DatePicker.prototype.inputHandler = function () {
|
|
702
|
+
DatePicker.prototype.inputHandler = function (e) {
|
|
703
703
|
this.isPopupClicked = false;
|
|
704
704
|
if (this.enableMask) {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
705
|
+
if (!isNullOrUndefined(e) && !isNullOrUndefined(e.inputType) && e.inputType === 'insertFromPaste') {
|
|
706
|
+
this.notify('maskPasteInputHandler', {
|
|
707
|
+
module: 'MaskedDateTime'
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
this.notify('inputHandler', {
|
|
712
|
+
module: 'MaskedDateTime'
|
|
713
|
+
});
|
|
714
|
+
}
|
|
708
715
|
}
|
|
709
716
|
};
|
|
710
717
|
DatePicker.prototype.inputBlurHandler = function (e) {
|
|
@@ -71,6 +71,7 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
71
71
|
this.parent.on('inputHandler', this.maskInputHandler, this);
|
|
72
72
|
this.parent.on('keyDownHandler', this.maskKeydownHandler, this);
|
|
73
73
|
this.parent.on('clearHandler', this.clearHandler, this);
|
|
74
|
+
this.parent.on('maskPasteInputHandler', this.maskPasteInputHandler, this);
|
|
74
75
|
};
|
|
75
76
|
MaskedDateTime.prototype.removeEventListener = function () {
|
|
76
77
|
if (this.parent.isDestroyed) {
|
|
@@ -81,6 +82,7 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
81
82
|
this.parent.off('inputHandler', this.maskInputHandler);
|
|
82
83
|
this.parent.off('keyDownHandler', this.maskKeydownHandler);
|
|
83
84
|
this.parent.off('clearHandler', this.clearHandler);
|
|
85
|
+
this.parent.off('maskPasteInputHandler', this.maskPasteInputHandler);
|
|
84
86
|
};
|
|
85
87
|
MaskedDateTime.prototype.createMask = function (mask) {
|
|
86
88
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;
|
|
@@ -667,6 +669,25 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
667
669
|
}
|
|
668
670
|
return formatValueSpecifier;
|
|
669
671
|
};
|
|
672
|
+
MaskedDateTime.prototype.isValidDate = function (dateString) {
|
|
673
|
+
var date = new Date(dateString);
|
|
674
|
+
// Return true if the date is valid, false otherwise
|
|
675
|
+
return !isNaN(date.getTime());
|
|
676
|
+
};
|
|
677
|
+
MaskedDateTime.prototype.maskPasteInputHandler = function () {
|
|
678
|
+
if (this.isValidDate(this.parent.inputElement.value)) {
|
|
679
|
+
this.maskDateValue = new Date(this.parent.inputElement.value);
|
|
680
|
+
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = true;
|
|
681
|
+
this.updateValue();
|
|
682
|
+
if (!this.isBlur) {
|
|
683
|
+
this.validCharacterCheck();
|
|
684
|
+
}
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
this.maskInputHandler();
|
|
689
|
+
}
|
|
690
|
+
};
|
|
670
691
|
MaskedDateTime.prototype.maskInputHandler = function () {
|
|
671
692
|
var start = this.parent.inputElement.selectionStart;
|
|
672
693
|
var formatText = '';
|
|
@@ -682,7 +703,6 @@ var MaskedDateTime = /** @class */ (function () {
|
|
|
682
703
|
this.previousHiddenMask = this.hiddenMask;
|
|
683
704
|
this.previousValue = inputValue;
|
|
684
705
|
this.parent.inputElement.value = inputValue;
|
|
685
|
-
this.parent.inputElement.value = inputValue;
|
|
686
706
|
for (var i = 0; i < this.hiddenMask.length; i++) {
|
|
687
707
|
if (formatText === this.hiddenMask[i]) {
|
|
688
708
|
start = i;
|