@syncfusion/ej2-calendars 28.2.3 → 28.2.9

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;
@@ -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();
@@ -14801,7 +14806,9 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14801
14806
  }
14802
14807
  else {
14803
14808
  this.isDayPart = false;
14804
- this.dayTypeCount = this.isDateZero ? this.dayTypeCount + 1 : this.dayTypeCount;
14809
+ if (!(this.dayTypeCount === 1 && this.isDateZero)) {
14810
+ this.dayTypeCount += this.isDateZero ? 1 : 0;
14811
+ }
14805
14812
  }
14806
14813
  break;
14807
14814
  }
@@ -14855,7 +14862,9 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14855
14862
  newDateValue.setMonth(0);
14856
14863
  this.isLeadingZero = true;
14857
14864
  this.isMonthPart = false;
14858
- this.monthTypeCount = this.isMonthZero ? this.monthTypeCount + 1 : this.monthTypeCount;
14865
+ if (!(this.monthTypeCount === 1 && this.isMonthZero)) {
14866
+ this.monthTypeCount += this.isMonthZero ? 1 : 0;
14867
+ }
14859
14868
  }
14860
14869
  }
14861
14870
  else {