@syncfusion/ej2-calendars 28.2.7 → 28.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/README.md +1 -1
- 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 +17 -9
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +16 -8
- 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 +8 -8
- package/src/daterangepicker/daterangepicker.js +10 -5
- package/src/maskbase/masked-date-time.js +3 -1
- package/src/timepicker/timepicker.js +3 -2
|
@@ -6295,7 +6295,12 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6295
6295
|
this.invalidValueString = null;
|
|
6296
6296
|
const dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
|
|
6297
6297
|
const startDate = this.globalize.parseDate(this.getAmPmValue(range[0]).trim(), dateOptions);
|
|
6298
|
-
|
|
6298
|
+
let endDate = this.globalize.parseDate(this.getAmPmValue(range[1]).trim(), dateOptions);
|
|
6299
|
+
if (this.start !== 'Decade' && this.start === 'Year' && this.depth !== 'Month') {
|
|
6300
|
+
if (this.inputElement.defaultValue !== value) {
|
|
6301
|
+
endDate = this.getStartEndDate(endDate, true);
|
|
6302
|
+
}
|
|
6303
|
+
}
|
|
6299
6304
|
if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
|
|
6300
6305
|
const prevStartVal = this.startValue;
|
|
6301
6306
|
this.startValue = startDate;
|
|
@@ -6368,7 +6373,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6368
6373
|
this.updateHiddenInput();
|
|
6369
6374
|
}
|
|
6370
6375
|
getStartEndDate(date, isEnd) {
|
|
6371
|
-
if (this.currentView() === 'Year' && !isNullOrUndefined(date)) {
|
|
6376
|
+
if ((this.currentView() === 'Year' && !isNullOrUndefined(date)) || this.depth === 'Year') {
|
|
6372
6377
|
return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
|
|
6373
6378
|
}
|
|
6374
6379
|
else if (this.currentView() === 'Decade' && !isNullOrUndefined(date)) {
|
|
@@ -7056,10 +7061,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7056
7061
|
}
|
|
7057
7062
|
const y = date.getFullYear();
|
|
7058
7063
|
const m = date.getMonth();
|
|
7059
|
-
const firstDay = isValue ? new Date(y, m, startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, m, 1);
|
|
7060
|
-
const lastDay = isValue ? new Date(y, m, endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, m + 1, 0);
|
|
7061
|
-
const firstMonth = isValue ? new Date(y, startDateValue.getMonth(), startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, 0, 1);
|
|
7062
|
-
const lastMonth = isValue ? new Date(y, endDateValue.getMonth(), endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, 11, 31);
|
|
7064
|
+
const firstDay = isValue && this.start !== 'Year' ? new Date(y, m, startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, m, 1);
|
|
7065
|
+
const lastDay = isValue && this.start !== 'Year' ? new Date(y, m, endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, m + 1, 0);
|
|
7066
|
+
const firstMonth = isValue && this.start !== 'Year' ? new Date(y, startDateValue.getMonth(), startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, 0, 1);
|
|
7067
|
+
const lastMonth = isValue && this.start !== 'Year' ? new Date(y, endDateValue.getMonth(), endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, 11, 31);
|
|
7063
7068
|
if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue)) {
|
|
7064
7069
|
if (!this.isMobile || this.isMobile && !this.endButton.element.classList.contains(ACTIVE$1)) {
|
|
7065
7070
|
this.removeSelection();
|
|
@@ -11117,8 +11122,9 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11117
11122
|
}
|
|
11118
11123
|
else {
|
|
11119
11124
|
if (!isNavigation) {
|
|
11120
|
-
|
|
11121
|
-
|
|
11125
|
+
const value = this.compareFormatChange(this.inputElement.value);
|
|
11126
|
+
if ((+this.prevDate !== +value) || isNullOrUndefined(this.checkDateValue(this.value))) {
|
|
11127
|
+
this.valueProcess(event, value);
|
|
11122
11128
|
}
|
|
11123
11129
|
}
|
|
11124
11130
|
else {
|
|
@@ -14394,7 +14400,7 @@ class MaskedDateTime {
|
|
|
14394
14400
|
this.isNavigate = false;
|
|
14395
14401
|
this.navigated = false;
|
|
14396
14402
|
this.isBlur = false;
|
|
14397
|
-
this.formatRegex = /EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;
|
|
14403
|
+
this.formatRegex = /EEEEE|EEEE|EEE|EE|E|cccc|ccc|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;
|
|
14398
14404
|
this.isDeletion = false;
|
|
14399
14405
|
this.isShortYear = false;
|
|
14400
14406
|
this.isDeleteKey = false;
|
|
@@ -14889,9 +14895,11 @@ class MaskedDateTime {
|
|
|
14889
14895
|
case 'E':
|
|
14890
14896
|
case 'EE':
|
|
14891
14897
|
case 'EEE':
|
|
14898
|
+
case 'ccc':
|
|
14892
14899
|
result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysAbbreviated[dayKeyAbbreviated[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();
|
|
14893
14900
|
break;
|
|
14894
14901
|
case 'EEEE':
|
|
14902
|
+
case 'cccc':
|
|
14895
14903
|
result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysWide[dayKeyWide[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();
|
|
14896
14904
|
break;
|
|
14897
14905
|
case 'EEEEE':
|