@syncfusion/ej2-calendars 21.2.8 → 21.2.10
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/CHANGELOG.md +2 -0
- 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 -14
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +21 -15
- 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 +10 -10
- package/src/calendar/calendar.js +2 -2
- package/src/datepicker/datepicker.d.ts +2 -1
- package/src/datepicker/datepicker.js +11 -6
- package/src/maskbase/masked-date-time.d.ts +2 -0
- package/src/maskbase/masked-date-time.js +7 -4
- package/src/timepicker/timepicker.js +1 -3
|
@@ -1601,10 +1601,10 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1601
1601
|
* @returns {string}
|
|
1602
1602
|
*/
|
|
1603
1603
|
CalendarBase.prototype.currentView = function () {
|
|
1604
|
-
if (this.contentElement.classList.contains(YEAR)) {
|
|
1604
|
+
if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(YEAR)) {
|
|
1605
1605
|
return 'Year';
|
|
1606
1606
|
}
|
|
1607
|
-
else if (this.contentElement.classList.contains(DECADE)) {
|
|
1607
|
+
else if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(DECADE)) {
|
|
1608
1608
|
return 'Decade';
|
|
1609
1609
|
}
|
|
1610
1610
|
else {
|
|
@@ -3244,6 +3244,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3244
3244
|
_this.isDynamicValueChanged = false;
|
|
3245
3245
|
_this.moduleName = _this.getModuleName();
|
|
3246
3246
|
_this.isFocused = false;
|
|
3247
|
+
_this.isBlur = false;
|
|
3247
3248
|
_this.datepickerOptions = options;
|
|
3248
3249
|
return _this;
|
|
3249
3250
|
}
|
|
@@ -3377,11 +3378,12 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3377
3378
|
Input.addAttributes({ 'aria-label': 'select' }, this.inputWrapper.buttons[0]);
|
|
3378
3379
|
addClass([this.inputWrapper.container], DATEWRAPPER);
|
|
3379
3380
|
};
|
|
3380
|
-
DatePicker.prototype.updateInput = function (isDynamic) {
|
|
3381
|
+
DatePicker.prototype.updateInput = function (isDynamic, isBlur) {
|
|
3381
3382
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
3383
|
+
if (isBlur === void 0) { isBlur = false; }
|
|
3382
3384
|
var formatOptions;
|
|
3383
3385
|
if (this.value && !this.isCalendar()) {
|
|
3384
|
-
this.disabledDates(isDynamic);
|
|
3386
|
+
this.disabledDates(isDynamic, isBlur);
|
|
3385
3387
|
}
|
|
3386
3388
|
if (isNaN(+new Date(this.checkValue(this.value)))) {
|
|
3387
3389
|
this.setProperties({ value: null }, true);
|
|
@@ -3864,7 +3866,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3864
3866
|
this.invalidValueString = null;
|
|
3865
3867
|
this.updateInputValue('');
|
|
3866
3868
|
}
|
|
3867
|
-
this.
|
|
3869
|
+
this.isBlur = true;
|
|
3870
|
+
this.updateInput(false, true);
|
|
3871
|
+
this.isBlur = false;
|
|
3868
3872
|
this.popupUpdate();
|
|
3869
3873
|
this.changeTrigger(e);
|
|
3870
3874
|
if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {
|
|
@@ -4248,7 +4252,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4248
4252
|
this.trigger('navigated', this.navigatedArgs);
|
|
4249
4253
|
};
|
|
4250
4254
|
DatePicker.prototype.changeEvent = function (event) {
|
|
4251
|
-
if (!this.isIconClicked) {
|
|
4255
|
+
if (!this.isIconClicked && !this.isBlur) {
|
|
4252
4256
|
this.selectCalendar(event);
|
|
4253
4257
|
}
|
|
4254
4258
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -4822,8 +4826,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4822
4826
|
DatePicker.prototype.getModuleName = function () {
|
|
4823
4827
|
return 'datepicker';
|
|
4824
4828
|
};
|
|
4825
|
-
DatePicker.prototype.disabledDates = function (isDynamic) {
|
|
4829
|
+
DatePicker.prototype.disabledDates = function (isDynamic, isBlur) {
|
|
4826
4830
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
4831
|
+
if (isBlur === void 0) { isBlur = false; }
|
|
4827
4832
|
var formatOptions;
|
|
4828
4833
|
var globalize;
|
|
4829
4834
|
var valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));
|
|
@@ -4878,7 +4883,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4878
4883
|
if (this.enableMask) {
|
|
4879
4884
|
this.updateInputValue(this.maskedDateValue);
|
|
4880
4885
|
this.notify('createMask', {
|
|
4881
|
-
module: 'MaskedDateTime'
|
|
4886
|
+
module: 'MaskedDateTime', isBlur: isBlur
|
|
4882
4887
|
});
|
|
4883
4888
|
}
|
|
4884
4889
|
}
|
|
@@ -10806,9 +10811,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
10806
10811
|
if (this.isValidLI(li)) {
|
|
10807
10812
|
this.checkValue(li.getAttribute('data-value'));
|
|
10808
10813
|
if (this.enableMask) {
|
|
10809
|
-
this.
|
|
10810
|
-
module: 'MaskedDateTime', navigated: true
|
|
10811
|
-
});
|
|
10814
|
+
this.createMask();
|
|
10812
10815
|
}
|
|
10813
10816
|
this.selectedElement = li;
|
|
10814
10817
|
this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);
|
|
@@ -13852,6 +13855,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13852
13855
|
this.isComplete = false;
|
|
13853
13856
|
this.isNavigate = false;
|
|
13854
13857
|
this.navigated = false;
|
|
13858
|
+
this.isBlur = false;
|
|
13855
13859
|
this.formatRegex = /EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;
|
|
13856
13860
|
this.isDeletion = false;
|
|
13857
13861
|
this.isShortYear = false;
|
|
@@ -13898,8 +13902,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13898
13902
|
this.parent.off('keyDownHandler', this.maskKeydownHandler);
|
|
13899
13903
|
this.parent.off('clearHandler', this.clearHandler);
|
|
13900
13904
|
};
|
|
13901
|
-
MaskedDateTime.prototype.createMask = function (
|
|
13902
|
-
if (navigated === void 0) { navigated = false; }
|
|
13905
|
+
MaskedDateTime.prototype.createMask = function (mask) {
|
|
13903
13906
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;
|
|
13904
13907
|
this.dateformat = this.getCulturedFormat();
|
|
13905
13908
|
if (this.parent.maskPlaceholder.day) {
|
|
@@ -13932,7 +13935,8 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13932
13935
|
this.mask = this.previousValue = inputValue;
|
|
13933
13936
|
this.parent.maskedDateValue = this.mask;
|
|
13934
13937
|
if (this.parent.value) {
|
|
13935
|
-
this.navigated =
|
|
13938
|
+
this.navigated = true;
|
|
13939
|
+
this.isBlur = mask.isBlur;
|
|
13936
13940
|
this.setDynamicValue();
|
|
13937
13941
|
}
|
|
13938
13942
|
};
|
|
@@ -13961,7 +13965,9 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13961
13965
|
this.maskDateValue = new Date(+this.parent.value);
|
|
13962
13966
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = true;
|
|
13963
13967
|
this.updateValue();
|
|
13964
|
-
this.
|
|
13968
|
+
if (!this.isBlur) {
|
|
13969
|
+
this.validCharacterCheck();
|
|
13970
|
+
}
|
|
13965
13971
|
};
|
|
13966
13972
|
MaskedDateTime.prototype.setSelection = function (validChar) {
|
|
13967
13973
|
var start = -1;
|