@syncfusion/ej2-calendars 28.2.7 → 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();