@syncfusion/ej2-calendars 24.2.5 → 24.2.8
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 +10 -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 +15 -21
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +15 -21
- 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 +5 -5
- package/src/daterangepicker/daterangepicker.d.ts +0 -2
- package/src/daterangepicker/daterangepicker.js +8 -12
- package/src/maskbase/masked-date-time.js +2 -4
|
@@ -32,7 +32,7 @@ var DEVICE = 'e-device';
|
|
|
32
32
|
var HEADER = 'e-header';
|
|
33
33
|
var RTL = 'e-rtl';
|
|
34
34
|
var CONTENT = 'e-content';
|
|
35
|
-
var CONTENTTABLE = 'e-content-table';
|
|
35
|
+
var CONTENTTABLE = 'e-calandar-content-table';
|
|
36
36
|
var YEAR = 'e-year';
|
|
37
37
|
var MONTH = 'e-month';
|
|
38
38
|
var DECADE = 'e-decade';
|
|
@@ -497,19 +497,19 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
497
497
|
this.effect = '';
|
|
498
498
|
switch (e.action) {
|
|
499
499
|
case 'moveLeft':
|
|
500
|
-
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(
|
|
500
|
+
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
501
501
|
this.keyboardNavigate(-1, view, e, this.max, this.min);
|
|
502
502
|
e.preventDefault();
|
|
503
503
|
}
|
|
504
504
|
break;
|
|
505
505
|
case 'moveRight':
|
|
506
|
-
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(
|
|
506
|
+
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
507
507
|
this.keyboardNavigate(1, view, e, this.max, this.min);
|
|
508
508
|
e.preventDefault();
|
|
509
509
|
}
|
|
510
510
|
break;
|
|
511
511
|
case 'moveUp':
|
|
512
|
-
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(
|
|
512
|
+
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
513
513
|
if (view === 0) {
|
|
514
514
|
this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
|
|
515
515
|
}
|
|
@@ -520,7 +520,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
520
520
|
}
|
|
521
521
|
break;
|
|
522
522
|
case 'moveDown':
|
|
523
|
-
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(
|
|
523
|
+
if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
524
524
|
if (view === 0) {
|
|
525
525
|
this.keyboardNavigate(7, view, e, this.max, this.min);
|
|
526
526
|
}
|
|
@@ -5478,7 +5478,6 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5478
5478
|
_this.invalidValueString = null;
|
|
5479
5479
|
_this.isAngular = false;
|
|
5480
5480
|
_this.preventChange = false;
|
|
5481
|
-
_this.isKeyPressed = false;
|
|
5482
5481
|
_this.dateRangeOptions = options;
|
|
5483
5482
|
return _this;
|
|
5484
5483
|
}
|
|
@@ -5834,7 +5833,6 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5834
5833
|
EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
|
|
5835
5834
|
EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
|
|
5836
5835
|
EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);
|
|
5837
|
-
EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);
|
|
5838
5836
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
5839
5837
|
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
|
|
5840
5838
|
}
|
|
@@ -5861,7 +5859,6 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5861
5859
|
EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
|
|
5862
5860
|
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
|
|
5863
5861
|
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
|
|
5864
|
-
EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);
|
|
5865
5862
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
5866
5863
|
EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
|
|
5867
5864
|
}
|
|
@@ -6116,8 +6113,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
6116
6113
|
var startDate = this.presetsItem[i].start;
|
|
6117
6114
|
var endDate = this.presetsItem[i].end;
|
|
6118
6115
|
if (this.startValue && this.endValue) {
|
|
6119
|
-
if ((
|
|
6120
|
-
|
|
6116
|
+
if (startDate.getDate() == this.startValue.getDate() && startDate.getMonth() == this.startValue.getMonth() && startDate.getFullYear() == this.startValue.getFullYear()
|
|
6117
|
+
&& endDate.getDate() == this.endValue.getDate() && endDate.getMonth() == this.endValue.getMonth() && endDate.getFullYear() == this.endValue.getFullYear()) {
|
|
6121
6118
|
this.activeIndex = i;
|
|
6122
6119
|
this.isCustomRange = false;
|
|
6123
6120
|
}
|
|
@@ -8096,9 +8093,6 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
8096
8093
|
this.startButton.element.classList.add(ACTIVE$1);
|
|
8097
8094
|
}
|
|
8098
8095
|
};
|
|
8099
|
-
DateRangePicker.prototype.keyupHandler = function (e) {
|
|
8100
|
-
this.isKeyPressed = (this.inputElement.value !== this.previousEleValue) ? true : false;
|
|
8101
|
-
};
|
|
8102
8096
|
DateRangePicker.prototype.applyFunction = function (eve) {
|
|
8103
8097
|
var isValueChanged = false;
|
|
8104
8098
|
if (eve.type !== 'touchstart') {
|
|
@@ -8121,13 +8115,15 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
8121
8115
|
eve.preventDefault();
|
|
8122
8116
|
}
|
|
8123
8117
|
if (!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) {
|
|
8118
|
+
if (!(this.previousStartValue && this.previousEndValue && this.startValue.getDate() == this.previousStartValue.getDate() && this.startValue.getMonth() == this.previousStartValue.getMonth() &&
|
|
8119
|
+
this.startValue.getFullYear() == this.previousStartValue.getFullYear()
|
|
8120
|
+
&& this.endValue.getDate() == this.previousEndValue.getDate() && this.endValue.getMonth() == this.previousEndValue.getMonth()
|
|
8121
|
+
&& this.endValue.getFullYear() == this.previousEndValue.getFullYear())) {
|
|
8122
|
+
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
8123
|
+
}
|
|
8124
8124
|
this.previousStartValue = new Date(+this.startValue);
|
|
8125
8125
|
this.previousEndValue = new Date(+this.endValue);
|
|
8126
8126
|
this.previousEleValue = this.inputElement.value;
|
|
8127
|
-
if (!this.isKeyPressed) {
|
|
8128
|
-
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
8129
|
-
}
|
|
8130
|
-
this.isKeyPressed = false;
|
|
8131
8127
|
if (+this.initStartDate !== +this.startValue || +this.initEndDate !== +this.endValue) {
|
|
8132
8128
|
isValueChanged = true;
|
|
8133
8129
|
}
|
|
@@ -14605,6 +14601,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
14605
14601
|
{
|
|
14606
14602
|
var year = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4
|
|
14607
14603
|
&& !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);
|
|
14604
|
+
var yearValue = (this.dateformat.match(/y/g) || []).length;
|
|
14608
14605
|
this.isShortYear = false;
|
|
14609
14606
|
this.isYearZero = (newVal[start - 1] === '0');
|
|
14610
14607
|
if (isNaN(year)) {
|
|
@@ -14618,7 +14615,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
14618
14615
|
}
|
|
14619
14616
|
else {
|
|
14620
14617
|
newDateValue.setFullYear(year);
|
|
14621
|
-
if (year.toString().length ===
|
|
14618
|
+
if (year.toString().length === yearValue) {
|
|
14622
14619
|
this.isNavigate = true;
|
|
14623
14620
|
}
|
|
14624
14621
|
this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
|
|
@@ -14793,9 +14790,6 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
14793
14790
|
case 'yy':
|
|
14794
14791
|
result = proxy.isYearPart ? proxy.roundOff(proxy.maskDateValue.getFullYear() % 100, 2) : proxy.defaultConstant['year'].toString();
|
|
14795
14792
|
result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);
|
|
14796
|
-
if (proxy.isYearPart) {
|
|
14797
|
-
proxy.isNavigate = proxy.isShortYear = (proxy.maskDateValue.getFullYear() % 100).toString().length === 2;
|
|
14798
|
-
}
|
|
14799
14793
|
break;
|
|
14800
14794
|
case 'y':
|
|
14801
14795
|
case 'yyyy':
|