@syncfusion/ej2-calendars 35.1.37 → 35.1.41
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 +19 -10
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +19 -10
- 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 +4 -4
- package/src/calendar/calendar.js +12 -10
- package/src/daterangepicker/daterangepicker.d.ts +1 -0
- package/src/daterangepicker/daterangepicker.js +7 -0
|
@@ -165,7 +165,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
165
165
|
this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(this.min))) }, true);
|
|
166
166
|
this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(this.max))) }, true);
|
|
167
167
|
this.currentDate = this.currentDate ? this.currentDate : new Date(new Date().setHours(0, 0, 0, 0));
|
|
168
|
-
if (!isNullOrUndefined(value) && this.min <= this.max && value >= this.min && value <= this.max) {
|
|
168
|
+
if (!isNullOrUndefined(value) && this.min <= this.max && value >= this.min && value <= this.max && !(this.refreshing && this.getModuleName() === 'calendar')) {
|
|
169
169
|
this.currentDate = new Date(this.checkValue(value));
|
|
170
170
|
}
|
|
171
171
|
}
|
|
@@ -186,16 +186,18 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
186
186
|
else {
|
|
187
187
|
removeClass([this.element], OVERLAY);
|
|
188
188
|
}
|
|
189
|
-
if (
|
|
190
|
-
this.
|
|
191
|
-
|
|
192
|
-
else {
|
|
193
|
-
if (+this.min <= +this.max && !value && +this.currentDate > +this.max) {
|
|
194
|
-
this.currentDate = new Date(this.checkValue(this.max));
|
|
189
|
+
if (!(this.refreshing && this.getModuleName() === 'calendar')) {
|
|
190
|
+
if (+this.min <= +this.max && value && +value <= +this.max && +value >= +this.min) {
|
|
191
|
+
this.currentDate = new Date(this.checkValue(value));
|
|
195
192
|
}
|
|
196
193
|
else {
|
|
197
|
-
if (+this.currentDate
|
|
198
|
-
this.currentDate = new Date(this.checkValue(this.
|
|
194
|
+
if (+this.min <= +this.max && !value && +this.currentDate > +this.max) {
|
|
195
|
+
this.currentDate = new Date(this.checkValue(this.max));
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
if (+this.currentDate < +this.min) {
|
|
199
|
+
this.currentDate = new Date(this.checkValue(this.min));
|
|
200
|
+
}
|
|
199
201
|
}
|
|
200
202
|
}
|
|
201
203
|
}
|
|
@@ -2277,7 +2279,7 @@ let Calendar = class Calendar extends CalendarBase {
|
|
|
2277
2279
|
this.setProperties({ value: this.checkDateValue(new Date(this.checkValue(this.value))) }, true); // persist the value property.
|
|
2278
2280
|
}
|
|
2279
2281
|
super.validateDate(this.value);
|
|
2280
|
-
if (!isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max) {
|
|
2282
|
+
if (!isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max && !(this.refreshing && this.getModuleName() === 'calendar')) {
|
|
2281
2283
|
this.currentDate = new Date(this.checkValue(this.value));
|
|
2282
2284
|
}
|
|
2283
2285
|
if (isNaN(+this.value)) {
|
|
@@ -6127,6 +6129,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6127
6129
|
bindEvents() {
|
|
6128
6130
|
EventHandler.add(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler, this);
|
|
6129
6131
|
EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
|
|
6132
|
+
EventHandler.add(this.inputElement, 'focusout', this.inputFocusOutHandler, this);
|
|
6130
6133
|
EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
|
|
6131
6134
|
EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);
|
|
6132
6135
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
@@ -6156,6 +6159,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6156
6159
|
EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
|
|
6157
6160
|
EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
|
|
6158
6161
|
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
|
|
6162
|
+
EventHandler.remove(this.inputElement, 'focusout', this.inputFocusOutHandler);
|
|
6159
6163
|
EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
|
|
6160
6164
|
if (this.showClearButton && this.inputWrapper.clearButton) {
|
|
6161
6165
|
EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
|
|
@@ -6320,6 +6324,11 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6320
6324
|
addClass([this.inputWrapper.container], [INPUTFOCUS$1]);
|
|
6321
6325
|
}
|
|
6322
6326
|
}
|
|
6327
|
+
inputFocusOutHandler(e) {
|
|
6328
|
+
if (this.isIconClick) {
|
|
6329
|
+
e.stopImmediatePropagation();
|
|
6330
|
+
}
|
|
6331
|
+
}
|
|
6323
6332
|
checkHtmlAttributes(isDynamic) {
|
|
6324
6333
|
this.globalize = new Internationalization(this.locale);
|
|
6325
6334
|
const attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|