@syncfusion/ej2-calendars 27.1.51 → 27.1.55
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 +55 -5
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +55 -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 +9 -9
- package/src/datepicker/datepicker.js +11 -4
- package/src/maskbase/masked-date-time.d.ts +4 -0
- package/src/maskbase/masked-date-time.js +45 -2
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.55
|
|
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.52",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-iQ86qDROqYqFxZUaO3x3+MlOUlu0MAuCcBYix+qICneAqcNVi4tCK/sW4l11uTTZ+keaeV+hv1OUWipuD30Zkg==",
|
|
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.52.tgz",
|
|
35
|
+
"_shasum": "025c3258a584a7fe99ed416d9ac8708561631f53",
|
|
36
36
|
"_spec": "@syncfusion/ej2-calendars@*",
|
|
37
37
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
38
38
|
"author": {
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~27.1.
|
|
47
|
-
"@syncfusion/ej2-buttons": "~27.1.
|
|
48
|
-
"@syncfusion/ej2-inputs": "~27.1.
|
|
46
|
+
"@syncfusion/ej2-base": "~27.1.55",
|
|
47
|
+
"@syncfusion/ej2-buttons": "~27.1.53",
|
|
48
|
+
"@syncfusion/ej2-inputs": "~27.1.55",
|
|
49
49
|
"@syncfusion/ej2-lists": "~27.1.50",
|
|
50
|
-
"@syncfusion/ej2-popups": "~27.1.
|
|
50
|
+
"@syncfusion/ej2-popups": "~27.1.55"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
53
53
|
"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.",
|
|
@@ -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.55",
|
|
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) {
|
|
@@ -54,7 +54,11 @@ export declare class MaskedDateTime {
|
|
|
54
54
|
private isPersist;
|
|
55
55
|
private differenceCheck;
|
|
56
56
|
private formatCheck;
|
|
57
|
+
private isValidDate;
|
|
58
|
+
private maskPasteInputHandler;
|
|
57
59
|
private maskInputHandler;
|
|
60
|
+
private findScrollableParent;
|
|
61
|
+
private isScrollable;
|
|
58
62
|
private navigateSelection;
|
|
59
63
|
private roundOff;
|
|
60
64
|
private zeroCheck;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L10n, getValue, getDefaultDateObject, cldrData } from '@syncfusion/ej2-base';
|
|
1
|
+
import { L10n, getValue, getDefaultDateObject, cldrData, Browser } from '@syncfusion/ej2-base';
|
|
2
2
|
var ARROWLEFT = 'ArrowLeft';
|
|
3
3
|
var ARROWRIGHT = 'ArrowRight';
|
|
4
4
|
var ARROWUP = 'ArrowUp';
|
|
@@ -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,25 +703,47 @@ 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;
|
|
689
709
|
break;
|
|
690
710
|
}
|
|
691
711
|
}
|
|
712
|
+
var scrollPositionY;
|
|
713
|
+
if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
|
|
714
|
+
var scrollableParent = this.findScrollableParent(this.parent.inputElement);
|
|
715
|
+
scrollPositionY = scrollableParent ? scrollableParent.getBoundingClientRect().top : window.scrollY;
|
|
716
|
+
}
|
|
692
717
|
this.parent.inputElement.selectionStart = start;
|
|
693
718
|
this.validCharacterCheck();
|
|
694
719
|
if ((this.isNavigate || this.isDeletion) && !this.isDeleteKey) {
|
|
695
720
|
var isbackward = this.isNavigate ? false : true;
|
|
696
721
|
this.isNavigate = this.isDeletion = false;
|
|
697
722
|
this.navigateSelection(isbackward);
|
|
723
|
+
if (Browser.isDevice && (Browser.isIos || Browser.isIos7)) {
|
|
724
|
+
setTimeout(function () {
|
|
725
|
+
window.scrollTo(0, scrollPositionY);
|
|
726
|
+
}, 0);
|
|
727
|
+
}
|
|
698
728
|
}
|
|
699
729
|
if (this.isDeleteKey) {
|
|
700
730
|
this.isDeletion = false;
|
|
701
731
|
}
|
|
702
732
|
this.isDeleteKey = false;
|
|
703
733
|
};
|
|
734
|
+
MaskedDateTime.prototype.findScrollableParent = function (element) {
|
|
735
|
+
while (element) {
|
|
736
|
+
if (this.isScrollable(element)) {
|
|
737
|
+
return element;
|
|
738
|
+
}
|
|
739
|
+
element = element.parentElement;
|
|
740
|
+
}
|
|
741
|
+
return null;
|
|
742
|
+
};
|
|
743
|
+
MaskedDateTime.prototype.isScrollable = function (element) {
|
|
744
|
+
var overflowY = window.getComputedStyle(element).overflowY;
|
|
745
|
+
return element.scrollHeight > element.clientHeight && (overflowY === 'auto' || overflowY === 'scroll');
|
|
746
|
+
};
|
|
704
747
|
MaskedDateTime.prototype.navigateSelection = function (isbackward) {
|
|
705
748
|
var start = this.parent.inputElement.selectionStart;
|
|
706
749
|
var end = this.parent.inputElement.selectionEnd;
|