@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
|
@@ -3980,10 +3980,14 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3980
3980
|
const target = e.target;
|
|
3981
3981
|
if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)
|
|
3982
3982
|
&& !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
|
|
3983
|
-
&& (!target.classList.contains('e-day'))
|
|
3984
|
-
&& (!target.classList.contains('e-dlg-overlay'))) {
|
|
3983
|
+
&& (!target.classList.contains('e-day'))) {
|
|
3985
3984
|
this.hide(e);
|
|
3986
|
-
|
|
3985
|
+
if (target.classList.contains('e-dlg-overlay')) {
|
|
3986
|
+
e.preventDefault();
|
|
3987
|
+
}
|
|
3988
|
+
else {
|
|
3989
|
+
this.focusOut();
|
|
3990
|
+
}
|
|
3987
3991
|
}
|
|
3988
3992
|
else if (closest(target, '.e-datepicker.e-popup-wrapper')) {
|
|
3989
3993
|
// Fix for close the popup when select the previously selected value.
|
|
@@ -4459,6 +4463,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4459
4463
|
this.changedArgs.element = this.element;
|
|
4460
4464
|
this.changedArgs.isInteracted = this.isInteracted;
|
|
4461
4465
|
if (!this.isDynamicValueChanged) {
|
|
4466
|
+
if (this.isAngular) {
|
|
4467
|
+
this.previousDate = this.value && new Date(+this.value);
|
|
4468
|
+
}
|
|
4462
4469
|
this.trigger('change', this.changedArgs);
|
|
4463
4470
|
}
|
|
4464
4471
|
this.previousDate = this.value && new Date(+this.value);
|
|
@@ -6388,6 +6395,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6388
6395
|
if (this.inputElement.defaultValue !== value) {
|
|
6389
6396
|
endDate = this.getStartEndDate(endDate, true);
|
|
6390
6397
|
}
|
|
6398
|
+
if (endDate >= this.max) {
|
|
6399
|
+
endDate = this.max;
|
|
6400
|
+
}
|
|
6391
6401
|
}
|
|
6392
6402
|
if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
|
|
6393
6403
|
const prevStartVal = this.startValue;
|
|
@@ -7268,6 +7278,29 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7268
7278
|
this.checkMinMaxDays();
|
|
7269
7279
|
}
|
|
7270
7280
|
}
|
|
7281
|
+
const isCustomMin = this.min.getTime() !== new Date(1900, 0, 1).getTime();
|
|
7282
|
+
const isCustomMax = this.max.getTime() !== new Date(2099, 11, 31).getTime();
|
|
7283
|
+
if (this.currentView() === 'Year' && this.depth === 'Year') {
|
|
7284
|
+
const startMonth = new Date(this.min.getFullYear(), this.min.getMonth(), 1);
|
|
7285
|
+
if (!isNullOrUndefined(this.startValue) && isCustomMin && +this.startValue <= +startMonth) {
|
|
7286
|
+
this.startValue = this.min;
|
|
7287
|
+
}
|
|
7288
|
+
const endMonth = new Date(this.max.getFullYear(), this.max.getMonth() + 1, 0);
|
|
7289
|
+
if (!isNullOrUndefined(this.endValue) && isCustomMax && +this.endValue >= +endMonth) {
|
|
7290
|
+
this.endValue = this.max;
|
|
7291
|
+
}
|
|
7292
|
+
}
|
|
7293
|
+
else if (this.currentView() === 'Decade' && this.depth === 'Decade') {
|
|
7294
|
+
if (!isNullOrUndefined(this.startValue) && isCustomMin && this.startValue.getFullYear() <= this.min.getFullYear()) {
|
|
7295
|
+
this.startValue = this.min;
|
|
7296
|
+
}
|
|
7297
|
+
else if (isCustomMin && this.startValue.getFullYear() > this.min.getFullYear()) {
|
|
7298
|
+
this.startValue = new Date(this.startValue.getFullYear(), 0, 1);
|
|
7299
|
+
}
|
|
7300
|
+
if (!isNullOrUndefined(this.endValue) && isCustomMax && this.endValue.getFullYear() >= this.max.getFullYear()) {
|
|
7301
|
+
this.endValue = this.max;
|
|
7302
|
+
}
|
|
7303
|
+
}
|
|
7271
7304
|
if (event) {
|
|
7272
7305
|
leftCalendar = closest(event.target, '.' + LEFTCALENDER);
|
|
7273
7306
|
}
|
|
@@ -11380,7 +11413,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11380
11413
|
keyConfigs: this.keyConfigure,
|
|
11381
11414
|
eventName: 'keydown'
|
|
11382
11415
|
});
|
|
11383
|
-
if (this.
|
|
11416
|
+
if (this.inputElement && (this.showClearButton || this.enableMask)) {
|
|
11384
11417
|
EventHandler.add(this.inputElement, 'mousedown', this.mouseDownHandler, this);
|
|
11385
11418
|
}
|
|
11386
11419
|
}
|
|
@@ -12080,11 +12113,15 @@ let TimePicker = class TimePicker extends Component {
|
|
|
12080
12113
|
if (!(closest(target, '[id="' + this.popupObj.element.id + '"]')) && target !== this.inputElement
|
|
12081
12114
|
&& target !== (this.inputWrapper && this.inputWrapper.buttons[0]) &&
|
|
12082
12115
|
target !== (this.inputWrapper && this.inputWrapper.clearButton) &&
|
|
12083
|
-
target !== (this.inputWrapper && this.inputWrapper.container)
|
|
12084
|
-
&& (!target.classList.contains('e-dlg-overlay'))) {
|
|
12116
|
+
target !== (this.inputWrapper && this.inputWrapper.container)) {
|
|
12085
12117
|
if (this.isPopupOpen()) {
|
|
12086
12118
|
this.hide();
|
|
12087
|
-
|
|
12119
|
+
if (target.classList.contains('e-dlg-overlay')) {
|
|
12120
|
+
event.preventDefault();
|
|
12121
|
+
}
|
|
12122
|
+
else {
|
|
12123
|
+
this.focusOut();
|
|
12124
|
+
}
|
|
12088
12125
|
}
|
|
12089
12126
|
}
|
|
12090
12127
|
else if (target !== this.inputElement) {
|
|
@@ -13319,10 +13356,15 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13319
13356
|
event.preventDefault();
|
|
13320
13357
|
}
|
|
13321
13358
|
if (!(closest(target, '[id="' + (this.popupObject && this.popupObject.element.id + '"]'))) && target !== this.inputElement
|
|
13322
|
-
&& target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container
|
|
13359
|
+
&& target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container) {
|
|
13323
13360
|
if (this.isTimePopupOpen()) {
|
|
13324
13361
|
this.hide(event);
|
|
13325
|
-
|
|
13362
|
+
if (target.classList.contains('e-dlg-overlay')) {
|
|
13363
|
+
event.preventDefault();
|
|
13364
|
+
}
|
|
13365
|
+
else {
|
|
13366
|
+
this.focusOut();
|
|
13367
|
+
}
|
|
13326
13368
|
}
|
|
13327
13369
|
}
|
|
13328
13370
|
else if (target !== this.inputElement) {
|