@syncfusion/ej2-calendars 20.2.46 → 20.2.50
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 +6 -0
- 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 +76 -7
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +76 -7
- 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 +8 -8
- package/src/calendar/calendar.d.ts +3 -2
- package/src/calendar/calendar.js +33 -7
- package/src/datepicker/datepicker.js +11 -0
- package/src/daterangepicker/daterangepicker.js +11 -0
- package/src/datetimepicker/datetimepicker.js +11 -0
- package/src/timepicker/timepicker.js +10 -0
- package/styles/bootstrap-dark.css +190 -0
- package/styles/bootstrap.css +190 -0
- package/styles/bootstrap4.css +190 -0
- package/styles/bootstrap5-dark.css +190 -0
- package/styles/bootstrap5.css +190 -0
- package/styles/datepicker/_layout.scss +123 -0
- package/styles/datepicker/bootstrap-dark.css +79 -0
- package/styles/datepicker/bootstrap.css +79 -0
- package/styles/datepicker/bootstrap4.css +79 -0
- package/styles/datepicker/bootstrap5-dark.css +79 -0
- package/styles/datepicker/bootstrap5.css +79 -0
- package/styles/datepicker/fabric-dark.css +79 -0
- package/styles/datepicker/fabric.css +79 -0
- package/styles/datepicker/fluent-dark.css +79 -0
- package/styles/datepicker/fluent.css +79 -0
- package/styles/datepicker/highcontrast-light.css +79 -0
- package/styles/datepicker/highcontrast.css +79 -0
- package/styles/datepicker/material-dark.css +79 -0
- package/styles/datepicker/material.css +79 -0
- package/styles/datepicker/tailwind-dark.css +79 -0
- package/styles/datepicker/tailwind.css +79 -0
- package/styles/daterangepicker/_layout.scss +151 -0
- package/styles/daterangepicker/bootstrap-dark.css +111 -0
- package/styles/daterangepicker/bootstrap.css +111 -0
- package/styles/daterangepicker/bootstrap4.css +111 -0
- package/styles/daterangepicker/bootstrap5-dark.css +111 -0
- package/styles/daterangepicker/bootstrap5.css +111 -0
- package/styles/daterangepicker/fabric-dark.css +111 -0
- package/styles/daterangepicker/fabric.css +111 -0
- package/styles/daterangepicker/fluent-dark.css +111 -0
- package/styles/daterangepicker/fluent.css +111 -0
- package/styles/daterangepicker/highcontrast-light.css +111 -0
- package/styles/daterangepicker/highcontrast.css +111 -0
- package/styles/daterangepicker/material-dark.css +111 -0
- package/styles/daterangepicker/material.css +111 -0
- package/styles/daterangepicker/tailwind-dark.css +111 -0
- package/styles/daterangepicker/tailwind.css +111 -0
- package/styles/fabric-dark.css +190 -0
- package/styles/fabric.css +190 -0
- package/styles/fluent-dark.css +190 -0
- package/styles/fluent.css +190 -0
- package/styles/highcontrast-light.css +190 -0
- package/styles/highcontrast.css +190 -0
- package/styles/material-dark.css +190 -0
- package/styles/material.css +190 -0
- package/styles/tailwind-dark.css +190 -0
- package/styles/tailwind.css +190 -0
|
@@ -83,6 +83,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
83
83
|
_this.isTodayClicked = false;
|
|
84
84
|
_this.preventChange = false;
|
|
85
85
|
_this.isAngular = false;
|
|
86
|
+
_this.previousDates = false;
|
|
86
87
|
return _this;
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
@@ -651,7 +652,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
651
652
|
var numCells = this.weekNumber ? 8 : 7;
|
|
652
653
|
var tdEles;
|
|
653
654
|
if (this.calendarMode === 'Gregorian') {
|
|
654
|
-
tdEles = this.renderDays(this.currentDate, value, null, null, isCustomDate);
|
|
655
|
+
tdEles = this.renderDays(this.currentDate, value, null, null, isCustomDate, e);
|
|
655
656
|
}
|
|
656
657
|
else {
|
|
657
658
|
tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);
|
|
@@ -664,7 +665,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
664
665
|
this.islamicModule.islamicRenderTemplate(tdEles, numCells, MONTH, e, value);
|
|
665
666
|
}
|
|
666
667
|
};
|
|
667
|
-
CalendarBase.prototype.renderDays = function (currentDate, value, multiSelection, values, isTodayDate) {
|
|
668
|
+
CalendarBase.prototype.renderDays = function (currentDate, value, multiSelection, values, isTodayDate, e) {
|
|
668
669
|
var tdEles = [];
|
|
669
670
|
var cellsCount = 42;
|
|
670
671
|
var todayDate = isTodayDate ? new Date(+currentDate) : this.getDate(new Date(), this.timezone);
|
|
@@ -755,6 +756,10 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
755
756
|
// if (args.isDisabled && +this.value === +args.date) {
|
|
756
757
|
// this.setProperties({ value: null }, true);
|
|
757
758
|
// }
|
|
759
|
+
var currentTarget = void 0;
|
|
760
|
+
if (!isNullOrUndefined(e) && e.type == 'click') {
|
|
761
|
+
currentTarget = e.currentTarget;
|
|
762
|
+
}
|
|
758
763
|
if (multiSelection && !isNullOrUndefined(values) && !disabledCls) {
|
|
759
764
|
for (var tempValue = 0; tempValue < values.length; tempValue++) {
|
|
760
765
|
var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
@@ -765,6 +770,22 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
765
770
|
|| (this.getDateVal(localDate, value))) {
|
|
766
771
|
addClass([tdEle], SELECTED);
|
|
767
772
|
}
|
|
773
|
+
if (!isNullOrUndefined(currentTarget) && currentTarget.innerText === tdEle.innerText && this.previousDates && currentTarget.classList.contains(SELECTED)) {
|
|
774
|
+
removeClass([tdEle], SELECTED);
|
|
775
|
+
this.previousDates = false;
|
|
776
|
+
var copyValues = this.copyValues(values);
|
|
777
|
+
for (var i = 0; i < copyValues.length; i++) {
|
|
778
|
+
var type_1 = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
|
|
779
|
+
var formatOptions_1 = { format: null, type: 'date', skeleton: 'short', calendar: type_1 };
|
|
780
|
+
var localDateString_1 = this.globalize.formatDate(date, formatOptions_1);
|
|
781
|
+
var tempDateString_1 = this.globalize.formatDate(copyValues[i], formatOptions_1);
|
|
782
|
+
if (localDateString_1 === tempDateString_1) {
|
|
783
|
+
var index = copyValues.indexOf(copyValues[i]);
|
|
784
|
+
copyValues.splice(index, 1);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
this.setProperties({ values: copyValues }, true);
|
|
788
|
+
}
|
|
768
789
|
else {
|
|
769
790
|
this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
|
|
770
791
|
}
|
|
@@ -2207,8 +2228,8 @@ var Calendar = /** @__PURE__ @class */ (function (_super) {
|
|
|
2207
2228
|
Calendar.prototype.renderMonths = function (e, value, isCustomDate) {
|
|
2208
2229
|
_super.prototype.renderMonths.call(this, e, this.value, isCustomDate);
|
|
2209
2230
|
};
|
|
2210
|
-
Calendar.prototype.renderDays = function (currentDate, value, isMultiSelect, values, isCustomDate) {
|
|
2211
|
-
var tempDays = _super.prototype.renderDays.call(this, currentDate, this.value, this.isMultiSelection, this.values, isCustomDate);
|
|
2231
|
+
Calendar.prototype.renderDays = function (currentDate, value, isMultiSelect, values, isCustomDate, e) {
|
|
2232
|
+
var tempDays = _super.prototype.renderDays.call(this, currentDate, this.value, this.isMultiSelection, this.values, isCustomDate, e);
|
|
2212
2233
|
if (this.isMultiSelection) {
|
|
2213
2234
|
_super.prototype.validateValues.call(this, this.isMultiSelection, this.values);
|
|
2214
2235
|
}
|
|
@@ -2246,9 +2267,14 @@ var Calendar = /** @__PURE__ @class */ (function (_super) {
|
|
|
2246
2267
|
if (eve.classList.contains(OTHERMONTH)) {
|
|
2247
2268
|
if (this.isMultiSelection) {
|
|
2248
2269
|
var copyValues = this.copyValues(this.values);
|
|
2249
|
-
copyValues.
|
|
2250
|
-
|
|
2251
|
-
|
|
2270
|
+
if (copyValues.toString().indexOf(this.getIdValue(e, null).toString()) === -1) {
|
|
2271
|
+
copyValues.push(this.getIdValue(e, null));
|
|
2272
|
+
this.setProperties({ values: copyValues }, true);
|
|
2273
|
+
this.setProperties({ value: this.values[this.values.length - 1] }, true);
|
|
2274
|
+
}
|
|
2275
|
+
else {
|
|
2276
|
+
this.previousDates = true;
|
|
2277
|
+
}
|
|
2252
2278
|
}
|
|
2253
2279
|
else {
|
|
2254
2280
|
this.setProperties({ value: this.getIdValue(e, null) }, true);
|
|
@@ -3157,6 +3183,10 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3157
3183
|
DatePicker.prototype.render = function () {
|
|
3158
3184
|
this.initialize();
|
|
3159
3185
|
this.bindEvents();
|
|
3186
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
3187
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
3188
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
3189
|
+
}
|
|
3160
3190
|
this.renderComplete();
|
|
3161
3191
|
this.setTimeZone(this.serverTimezoneOffset);
|
|
3162
3192
|
};
|
|
@@ -4881,11 +4911,18 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4881
4911
|
break;
|
|
4882
4912
|
case 'width':
|
|
4883
4913
|
this.setWidth(newProp.width);
|
|
4914
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
4915
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
4916
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
4917
|
+
}
|
|
4884
4918
|
break;
|
|
4885
4919
|
case 'floatLabelType':
|
|
4886
4920
|
this.floatLabelType = newProp.floatLabelType;
|
|
4887
4921
|
Input.removeFloating(this.inputWrapper);
|
|
4888
4922
|
Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);
|
|
4923
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
4924
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
4925
|
+
}
|
|
4889
4926
|
break;
|
|
4890
4927
|
case 'enableMask':
|
|
4891
4928
|
if (this.enableMask) {
|
|
@@ -5164,6 +5201,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5164
5201
|
if (this.element.hasAttribute('data-val')) {
|
|
5165
5202
|
this.element.setAttribute('data-val', 'false');
|
|
5166
5203
|
}
|
|
5204
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
5205
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
5206
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
5207
|
+
}
|
|
5167
5208
|
this.renderComplete();
|
|
5168
5209
|
};
|
|
5169
5210
|
/**
|
|
@@ -9102,6 +9143,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9102
9143
|
switch (prop) {
|
|
9103
9144
|
case 'width':
|
|
9104
9145
|
this.setEleWidth(this.width);
|
|
9146
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
9147
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
9148
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
9149
|
+
}
|
|
9105
9150
|
break;
|
|
9106
9151
|
case 'separator':
|
|
9107
9152
|
this.previousEleValue = this.inputElement.value;
|
|
@@ -9293,6 +9338,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9293
9338
|
this.floatLabelType = newProp.floatLabelType;
|
|
9294
9339
|
Input.removeFloating(this.inputWrapper);
|
|
9295
9340
|
Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);
|
|
9341
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
9342
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
9343
|
+
}
|
|
9296
9344
|
break;
|
|
9297
9345
|
case 'start':
|
|
9298
9346
|
this.setProperties({ start: newProp.start }, true);
|
|
@@ -9628,6 +9676,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9628
9676
|
this.anchor = this.inputElement;
|
|
9629
9677
|
this.inputElement.setAttribute('value', this.inputElement.value);
|
|
9630
9678
|
this.inputEleValue = this.getDateObject(this.inputElement.value);
|
|
9679
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
9680
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
9681
|
+
}
|
|
9631
9682
|
this.renderComplete();
|
|
9632
9683
|
};
|
|
9633
9684
|
TimePicker.prototype.setTimeAllowEdit = function () {
|
|
@@ -11739,6 +11790,10 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11739
11790
|
case 'width':
|
|
11740
11791
|
setStyleAttribute(this.inputWrapper.container, { 'width': this.setWidth(newProp.width) });
|
|
11741
11792
|
this.containerStyle = this.inputWrapper.container.getBoundingClientRect();
|
|
11793
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
11794
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
11795
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
11796
|
+
}
|
|
11742
11797
|
break;
|
|
11743
11798
|
case 'format':
|
|
11744
11799
|
this.setProperties({ format: newProp.format }, true);
|
|
@@ -11789,6 +11844,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11789
11844
|
this.floatLabelType = newProp.floatLabelType;
|
|
11790
11845
|
Input.removeFloating(this.inputWrapper);
|
|
11791
11846
|
Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);
|
|
11847
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
11848
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
11849
|
+
}
|
|
11792
11850
|
break;
|
|
11793
11851
|
case 'strictMode':
|
|
11794
11852
|
this.invalidValueString = null;
|
|
@@ -12151,6 +12209,10 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12151
12209
|
this.inputElement.tabIndex = -1;
|
|
12152
12210
|
}
|
|
12153
12211
|
}
|
|
12212
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
12213
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
12214
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');
|
|
12215
|
+
}
|
|
12154
12216
|
this.renderComplete();
|
|
12155
12217
|
};
|
|
12156
12218
|
DateTimePicker.prototype.setValue = function () {
|
|
@@ -13341,6 +13403,10 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13341
13403
|
break;
|
|
13342
13404
|
case 'width':
|
|
13343
13405
|
this.setWidth(newProp.width);
|
|
13406
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
13407
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
13408
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');
|
|
13409
|
+
}
|
|
13344
13410
|
break;
|
|
13345
13411
|
case 'readonly':
|
|
13346
13412
|
Input.setReadonly(this.readonly, this.inputElement);
|
|
@@ -13349,6 +13415,9 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13349
13415
|
this.floatLabelType = newProp.floatLabelType;
|
|
13350
13416
|
Input.removeFloating(this.inputWrapper);
|
|
13351
13417
|
Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);
|
|
13418
|
+
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
13419
|
+
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');
|
|
13420
|
+
}
|
|
13352
13421
|
break;
|
|
13353
13422
|
case 'scrollTo':
|
|
13354
13423
|
if (this.checkDateValue(new Date(this.checkValue(newProp.scrollTo)))) {
|