@syncfusion/ej2-calendars 29.2.4 → 29.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/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 +51 -9
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +51 -9
- 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 +14 -57
- package/src/datepicker/datepicker.js +10 -3
- package/src/daterangepicker/daterangepicker.js +26 -0
- package/src/datetimepicker/datetimepicker.js +7 -2
- package/src/timepicker/timepicker.js +8 -4
|
@@ -4023,10 +4023,14 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4023
4023
|
var target = e.target;
|
|
4024
4024
|
if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)
|
|
4025
4025
|
&& !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
|
|
4026
|
-
&& (!target.classList.contains('e-day'))
|
|
4027
|
-
&& (!target.classList.contains('e-dlg-overlay'))) {
|
|
4026
|
+
&& (!target.classList.contains('e-day'))) {
|
|
4028
4027
|
this.hide(e);
|
|
4029
|
-
|
|
4028
|
+
if (target.classList.contains('e-dlg-overlay')) {
|
|
4029
|
+
e.preventDefault();
|
|
4030
|
+
}
|
|
4031
|
+
else {
|
|
4032
|
+
this.focusOut();
|
|
4033
|
+
}
|
|
4030
4034
|
}
|
|
4031
4035
|
else if (closest(target, '.e-datepicker.e-popup-wrapper')) {
|
|
4032
4036
|
// Fix for close the popup when select the previously selected value.
|
|
@@ -4505,6 +4509,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4505
4509
|
this.changedArgs.element = this.element;
|
|
4506
4510
|
this.changedArgs.isInteracted = this.isInteracted;
|
|
4507
4511
|
if (!this.isDynamicValueChanged) {
|
|
4512
|
+
if (this.isAngular) {
|
|
4513
|
+
this.previousDate = this.value && new Date(+this.value);
|
|
4514
|
+
}
|
|
4508
4515
|
this.trigger('change', this.changedArgs);
|
|
4509
4516
|
}
|
|
4510
4517
|
this.previousDate = this.value && new Date(+this.value);
|
|
@@ -6467,6 +6474,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
6467
6474
|
if (this.inputElement.defaultValue !== value) {
|
|
6468
6475
|
endDate = this.getStartEndDate(endDate, true);
|
|
6469
6476
|
}
|
|
6477
|
+
if (endDate >= this.max) {
|
|
6478
|
+
endDate = this.max;
|
|
6479
|
+
}
|
|
6470
6480
|
}
|
|
6471
6481
|
if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
|
|
6472
6482
|
var prevStartVal = this.startValue;
|
|
@@ -7355,6 +7365,29 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
7355
7365
|
this.checkMinMaxDays();
|
|
7356
7366
|
}
|
|
7357
7367
|
}
|
|
7368
|
+
var isCustomMin = this.min.getTime() !== new Date(1900, 0, 1).getTime();
|
|
7369
|
+
var isCustomMax = this.max.getTime() !== new Date(2099, 11, 31).getTime();
|
|
7370
|
+
if (this.currentView() === 'Year' && this.depth === 'Year') {
|
|
7371
|
+
var startMonth = new Date(this.min.getFullYear(), this.min.getMonth(), 1);
|
|
7372
|
+
if (!isNullOrUndefined(this.startValue) && isCustomMin && +this.startValue <= +startMonth) {
|
|
7373
|
+
this.startValue = this.min;
|
|
7374
|
+
}
|
|
7375
|
+
var endMonth = new Date(this.max.getFullYear(), this.max.getMonth() + 1, 0);
|
|
7376
|
+
if (!isNullOrUndefined(this.endValue) && isCustomMax && +this.endValue >= +endMonth) {
|
|
7377
|
+
this.endValue = this.max;
|
|
7378
|
+
}
|
|
7379
|
+
}
|
|
7380
|
+
else if (this.currentView() === 'Decade' && this.depth === 'Decade') {
|
|
7381
|
+
if (!isNullOrUndefined(this.startValue) && isCustomMin && this.startValue.getFullYear() <= this.min.getFullYear()) {
|
|
7382
|
+
this.startValue = this.min;
|
|
7383
|
+
}
|
|
7384
|
+
else if (isCustomMin && this.startValue.getFullYear() > this.min.getFullYear()) {
|
|
7385
|
+
this.startValue = new Date(this.startValue.getFullYear(), 0, 1);
|
|
7386
|
+
}
|
|
7387
|
+
if (!isNullOrUndefined(this.endValue) && isCustomMax && this.endValue.getFullYear() >= this.max.getFullYear()) {
|
|
7388
|
+
this.endValue = this.max;
|
|
7389
|
+
}
|
|
7390
|
+
}
|
|
7358
7391
|
if (event) {
|
|
7359
7392
|
leftCalendar = closest(event.target, '.' + LEFTCALENDER);
|
|
7360
7393
|
}
|
|
@@ -11505,7 +11538,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11505
11538
|
keyConfigs: this.keyConfigure,
|
|
11506
11539
|
eventName: 'keydown'
|
|
11507
11540
|
});
|
|
11508
|
-
if (this.
|
|
11541
|
+
if (this.inputElement && (this.showClearButton || this.enableMask)) {
|
|
11509
11542
|
EventHandler.add(this.inputElement, 'mousedown', this.mouseDownHandler, this);
|
|
11510
11543
|
}
|
|
11511
11544
|
}
|
|
@@ -12207,11 +12240,15 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12207
12240
|
if (!(closest(target, '[id="' + this.popupObj.element.id + '"]')) && target !== this.inputElement
|
|
12208
12241
|
&& target !== (this.inputWrapper && this.inputWrapper.buttons[0]) &&
|
|
12209
12242
|
target !== (this.inputWrapper && this.inputWrapper.clearButton) &&
|
|
12210
|
-
target !== (this.inputWrapper && this.inputWrapper.container)
|
|
12211
|
-
&& (!target.classList.contains('e-dlg-overlay'))) {
|
|
12243
|
+
target !== (this.inputWrapper && this.inputWrapper.container)) {
|
|
12212
12244
|
if (this.isPopupOpen()) {
|
|
12213
12245
|
this.hide();
|
|
12214
|
-
|
|
12246
|
+
if (target.classList.contains('e-dlg-overlay')) {
|
|
12247
|
+
event.preventDefault();
|
|
12248
|
+
}
|
|
12249
|
+
else {
|
|
12250
|
+
this.focusOut();
|
|
12251
|
+
}
|
|
12215
12252
|
}
|
|
12216
12253
|
}
|
|
12217
12254
|
else if (target !== this.inputElement) {
|
|
@@ -13466,10 +13503,15 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13466
13503
|
event.preventDefault();
|
|
13467
13504
|
}
|
|
13468
13505
|
if (!(closest(target, '[id="' + (this.popupObject && this.popupObject.element.id + '"]'))) && target !== this.inputElement
|
|
13469
|
-
&& target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container
|
|
13506
|
+
&& target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container) {
|
|
13470
13507
|
if (this.isTimePopupOpen()) {
|
|
13471
13508
|
this.hide(event);
|
|
13472
|
-
|
|
13509
|
+
if (target.classList.contains('e-dlg-overlay')) {
|
|
13510
|
+
event.preventDefault();
|
|
13511
|
+
}
|
|
13512
|
+
else {
|
|
13513
|
+
this.focusOut();
|
|
13514
|
+
}
|
|
13473
13515
|
}
|
|
13474
13516
|
}
|
|
13475
13517
|
else if (target !== this.inputElement) {
|