@syncfusion/ej2-calendars 21.1.38 → 21.2.3
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 +10 -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 +20 -5
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +20 -5
- 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 +11 -14
- package/src/calendar/calendar.js +5 -2
- package/src/datepicker/datepicker.js +4 -1
- package/src/datetimepicker/datetimepicker.js +6 -1
- package/src/timepicker/timepicker.js +5 -1
|
@@ -793,7 +793,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
793
793
|
addClass([tdEle], SELECTED);
|
|
794
794
|
}
|
|
795
795
|
this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
|
|
796
|
-
if (date.getFullYear() === todayDate.getFullYear() && date.getMonth() === todayDate.getMonth()
|
|
796
|
+
if (!isNullOrUndefined(date) && date.getFullYear() === todayDate.getFullYear() && date.getMonth() === todayDate.getMonth()
|
|
797
797
|
&& date.getDate() === todayDate.getDate()) {
|
|
798
798
|
addClass([tdEle], TODAY);
|
|
799
799
|
}
|
|
@@ -926,7 +926,10 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
926
926
|
const type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
927
927
|
const dateFormatOptions = { skeleton: 'full', type: 'dateTime', calendar: type };
|
|
928
928
|
const date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
|
|
929
|
-
|
|
929
|
+
let value;
|
|
930
|
+
if (!isNullOrUndefined(date)) {
|
|
931
|
+
value = date.valueOf();
|
|
932
|
+
}
|
|
930
933
|
const attrs = {
|
|
931
934
|
className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false' }
|
|
932
935
|
};
|
|
@@ -3261,10 +3264,13 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3261
3264
|
this.createInput();
|
|
3262
3265
|
this.updateHtmlAttributeToWrapper();
|
|
3263
3266
|
this.setAllowEdit();
|
|
3264
|
-
this.updateInput(true);
|
|
3265
3267
|
if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType === 'Always' || !this.floatLabelType || !this.placeholder)) {
|
|
3268
|
+
this.updateInput(true);
|
|
3266
3269
|
this.updateInputValue(this.maskedDateValue);
|
|
3267
3270
|
}
|
|
3271
|
+
else if (!this.enableMask) {
|
|
3272
|
+
this.updateInput(true);
|
|
3273
|
+
}
|
|
3268
3274
|
this.previousElementValue = this.inputElement.value;
|
|
3269
3275
|
this.previousDate = !isNullOrUndefined(this.value) ? new Date(+this.value) : null;
|
|
3270
3276
|
this.inputElement.setAttribute('value', this.inputElement.value);
|
|
@@ -11879,7 +11885,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11879
11885
|
this.invalidValueString = null;
|
|
11880
11886
|
this.checkInvalidValue(newProp.value);
|
|
11881
11887
|
newProp.value = this.value;
|
|
11882
|
-
if (!this.invalidValueString) {
|
|
11888
|
+
if (!this.invalidValueString && !this.enableMask) {
|
|
11883
11889
|
if (typeof newProp.value === 'string') {
|
|
11884
11890
|
this.setProperties({ value: this.checkDateValue(new Date(newProp.value)) }, true);
|
|
11885
11891
|
newProp.value = this.value;
|
|
@@ -11892,6 +11898,10 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11892
11898
|
this.initValue = newProp.value;
|
|
11893
11899
|
newProp.value = this.compareFormatChange(this.checkValue(newProp.value));
|
|
11894
11900
|
}
|
|
11901
|
+
else if (this.enableMask) {
|
|
11902
|
+
this.updateInputValue(this.maskedDateValue);
|
|
11903
|
+
this.checkErrorState(this.maskedDateValue);
|
|
11904
|
+
}
|
|
11895
11905
|
else {
|
|
11896
11906
|
this.updateInputValue(this.invalidValueString);
|
|
11897
11907
|
this.checkErrorState(this.invalidValueString);
|
|
@@ -13381,7 +13391,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13381
13391
|
this.checkInvalidValue(newProp.value);
|
|
13382
13392
|
newProp.value = this.value;
|
|
13383
13393
|
newProp.value = this.validateValue(newProp.value);
|
|
13384
|
-
|
|
13394
|
+
if (this.enableMask) {
|
|
13395
|
+
Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
13396
|
+
}
|
|
13397
|
+
else {
|
|
13398
|
+
Input.setValue(this.getFormattedValue(newProp.value), this.inputElement, this.floatLabelType, this.showClearButton);
|
|
13399
|
+
}
|
|
13385
13400
|
this.valueWithMinutes = newProp.value;
|
|
13386
13401
|
this.setProperties({ value: newProp.value }, true);
|
|
13387
13402
|
if (this.popupObj) {
|