@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.
@@ -6372,6 +6372,11 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6372
6372
  var dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
6373
6373
  var startDate = this.globalize.parseDate(this.getAmPmValue(range[0]).trim(), dateOptions);
6374
6374
  var endDate = this.globalize.parseDate(this.getAmPmValue(range[1]).trim(), dateOptions);
6375
+ if (this.start !== 'Decade' && this.start === 'Year' && this.depth !== 'Month') {
6376
+ if (this.inputElement.defaultValue !== value) {
6377
+ endDate = this.getStartEndDate(endDate, true);
6378
+ }
6379
+ }
6375
6380
  if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
6376
6381
  var prevStartVal = this.startValue;
6377
6382
  this.startValue = startDate;
@@ -6444,7 +6449,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6444
6449
  this.updateHiddenInput();
6445
6450
  };
6446
6451
  DateRangePicker.prototype.getStartEndDate = function (date, isEnd) {
6447
- if (this.currentView() === 'Year' && !isNullOrUndefined(date)) {
6452
+ if ((this.currentView() === 'Year' && !isNullOrUndefined(date)) || this.depth === 'Year') {
6448
6453
  return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
6449
6454
  }
6450
6455
  else if (this.currentView() === 'Decade' && !isNullOrUndefined(date)) {
@@ -7138,10 +7143,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
7138
7143
  }
7139
7144
  var y = date.getFullYear();
7140
7145
  var m = date.getMonth();
7141
- var firstDay = isValue ? new Date(y, m, startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, m, 1);
7142
- var lastDay = isValue ? new Date(y, m, endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, m + 1, 0);
7143
- var firstMonth = isValue ? new Date(y, startDateValue.getMonth(), startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, 0, 1);
7144
- var lastMonth = isValue ? new Date(y, endDateValue.getMonth(), endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, 11, 31);
7146
+ var firstDay = isValue && this.start !== 'Year' ? new Date(y, m, startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, m, 1);
7147
+ var lastDay = isValue && this.start !== 'Year' ? new Date(y, m, endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, m + 1, 0);
7148
+ var firstMonth = isValue && this.start !== 'Year' ? new Date(y, startDateValue.getMonth(), startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, 0, 1);
7149
+ var lastMonth = isValue && this.start !== 'Year' ? new Date(y, endDateValue.getMonth(), endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, 11, 31);
7145
7150
  if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue)) {
7146
7151
  if (!this.isMobile || this.isMobile && !this.endButton.element.classList.contains(ACTIVE$1)) {
7147
7152
  this.removeSelection();
@@ -11239,8 +11244,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11239
11244
  }
11240
11245
  else {
11241
11246
  if (!isNavigation) {
11242
- if ((this.prevValue !== this.inputElement.value) || isNullOrUndefined(this.checkDateValue(this.value))) {
11243
- this.valueProcess(event, this.compareFormatChange(this.inputElement.value));
11247
+ var value = this.compareFormatChange(this.inputElement.value);
11248
+ if ((+this.prevDate !== +value) || isNullOrUndefined(this.checkDateValue(this.value))) {
11249
+ this.valueProcess(event, value);
11244
11250
  }
11245
11251
  }
11246
11252
  else {
@@ -14543,7 +14549,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14543
14549
  this.isNavigate = false;
14544
14550
  this.navigated = false;
14545
14551
  this.isBlur = false;
14546
- 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;
14552
+ 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;
14547
14553
  this.isDeletion = false;
14548
14554
  this.isShortYear = false;
14549
14555
  this.isDeleteKey = false;
@@ -15039,9 +15045,11 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
15039
15045
  case 'E':
15040
15046
  case 'EE':
15041
15047
  case 'EEE':
15048
+ case 'ccc':
15042
15049
  result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysAbbreviated[dayKeyAbbreviated[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();
15043
15050
  break;
15044
15051
  case 'EEEE':
15052
+ case 'cccc':
15045
15053
  result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysWide[dayKeyWide[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();
15046
15054
  break;
15047
15055
  case 'EEEEE':