@syncfusion/ej2-calendars 29.2.5 → 29.2.11
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 +30 -1
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +30 -1
- 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 +13 -56
- package/src/datepicker/datepicker.js +3 -0
- package/src/daterangepicker/daterangepicker.js +26 -0
- package/src/timepicker/timepicker.js +1 -1
|
@@ -4463,6 +4463,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4463
4463
|
this.changedArgs.element = this.element;
|
|
4464
4464
|
this.changedArgs.isInteracted = this.isInteracted;
|
|
4465
4465
|
if (!this.isDynamicValueChanged) {
|
|
4466
|
+
if (this.isAngular) {
|
|
4467
|
+
this.previousDate = this.value && new Date(+this.value);
|
|
4468
|
+
}
|
|
4466
4469
|
this.trigger('change', this.changedArgs);
|
|
4467
4470
|
}
|
|
4468
4471
|
this.previousDate = this.value && new Date(+this.value);
|
|
@@ -6392,6 +6395,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6392
6395
|
if (this.inputElement.defaultValue !== value) {
|
|
6393
6396
|
endDate = this.getStartEndDate(endDate, true);
|
|
6394
6397
|
}
|
|
6398
|
+
if (endDate >= this.max) {
|
|
6399
|
+
endDate = this.max;
|
|
6400
|
+
}
|
|
6395
6401
|
}
|
|
6396
6402
|
if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
|
|
6397
6403
|
const prevStartVal = this.startValue;
|
|
@@ -7272,6 +7278,29 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7272
7278
|
this.checkMinMaxDays();
|
|
7273
7279
|
}
|
|
7274
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
|
+
}
|
|
7275
7304
|
if (event) {
|
|
7276
7305
|
leftCalendar = closest(event.target, '.' + LEFTCALENDER);
|
|
7277
7306
|
}
|
|
@@ -11384,7 +11413,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11384
11413
|
keyConfigs: this.keyConfigure,
|
|
11385
11414
|
eventName: 'keydown'
|
|
11386
11415
|
});
|
|
11387
|
-
if (this.
|
|
11416
|
+
if (this.inputElement && (this.showClearButton || this.enableMask)) {
|
|
11388
11417
|
EventHandler.add(this.inputElement, 'mousedown', this.mouseDownHandler, this);
|
|
11389
11418
|
}
|
|
11390
11419
|
}
|