@syncfusion/ej2-calendars 22.2.5 → 22.2.8
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.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 -9
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +19 -9
- 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 +9 -9
- package/src/datepicker/datepicker.js +1 -5
- package/src/daterangepicker/daterangepicker.js +0 -4
- package/src/timepicker/timepicker-model.d.ts +10 -0
- package/src/timepicker/timepicker.d.ts +11 -0
- package/src/timepicker/timepicker.js +18 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.2.
|
|
3
|
+
* version : 22.2.8
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-calendars@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-calendars@22.
|
|
3
|
+
"_id": "@syncfusion/ej2-calendars@22.2.5",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-8uOgh/z4WYO1S0RRs7i9xKrTZH7IMosBksP0wQKJc0+qfH41qrqqMmO8ZRw4YWOrMuvgNq3pbYSVi+hZHvAgKQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-calendars",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"/@syncfusion/ej2-schedule",
|
|
33
33
|
"/@syncfusion/ej2-vue-calendars"
|
|
34
34
|
],
|
|
35
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-22.
|
|
36
|
-
"_shasum": "
|
|
35
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-22.2.5.tgz",
|
|
36
|
+
"_shasum": "ce697c5db112a2a494f5e224efed4dd6980a5e7f",
|
|
37
37
|
"_spec": "@syncfusion/ej2-calendars@*",
|
|
38
38
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
39
39
|
"author": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"bundleDependencies": false,
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@syncfusion/ej2-base": "~22.2.5",
|
|
48
|
-
"@syncfusion/ej2-buttons": "~22.2.
|
|
49
|
-
"@syncfusion/ej2-inputs": "~22.2.
|
|
50
|
-
"@syncfusion/ej2-lists": "~22.2.
|
|
51
|
-
"@syncfusion/ej2-popups": "~22.2.
|
|
48
|
+
"@syncfusion/ej2-buttons": "~22.2.8",
|
|
49
|
+
"@syncfusion/ej2-inputs": "~22.2.7",
|
|
50
|
+
"@syncfusion/ej2-lists": "~22.2.8",
|
|
51
|
+
"@syncfusion/ej2-popups": "~22.2.7"
|
|
52
52
|
},
|
|
53
53
|
"deprecated": false,
|
|
54
54
|
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
82
82
|
},
|
|
83
83
|
"typings": "index.d.ts",
|
|
84
|
-
"version": "22.2.
|
|
84
|
+
"version": "22.2.8",
|
|
85
85
|
"sideEffects": false
|
|
86
86
|
}
|
|
@@ -985,7 +985,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
985
985
|
this.popupObj = new Popup(this.popupWrapper, {
|
|
986
986
|
content: this.calendarElement,
|
|
987
987
|
relateTo: Browser.isDevice ? document.body : this.inputWrapper.container,
|
|
988
|
-
position: Browser.isDevice ? { X: 'center', Y: 'center' } : { X: 'left', Y: 'bottom' },
|
|
988
|
+
position: Browser.isDevice ? { X: 'center', Y: 'center' } : (this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' }),
|
|
989
989
|
offsetY: OFFSETVALUE,
|
|
990
990
|
targetType: 'container',
|
|
991
991
|
enableRtl: this.enableRtl,
|
|
@@ -1303,7 +1303,6 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1303
1303
|
addClass(_this.inputWrapper.buttons, ACTIVE);
|
|
1304
1304
|
_this.preventArgs.appendTo.appendChild(_this.popupWrapper);
|
|
1305
1305
|
_this.popupObj.refreshPosition(_this.inputElement);
|
|
1306
|
-
var popupLeft = parseFloat(_this.popupWrapper.style.left) - (_this.popupWrapper.offsetWidth - _this.inputWrapper.container.offsetWidth);
|
|
1307
1306
|
var openAnimation = {
|
|
1308
1307
|
name: 'FadeIn',
|
|
1309
1308
|
duration: Browser.isDevice ? 0 : OPENDURATION
|
|
@@ -1317,9 +1316,6 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1317
1316
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1318
1317
|
_super.prototype.setOverlayIndex.call(_this, _this.mobilePopupWrapper, _this.popupObj.element, _this.modal, Browser.isDevice);
|
|
1319
1318
|
_this.setAriaAttributes();
|
|
1320
|
-
if (_this.enableRtl && popupLeft > 0) {
|
|
1321
|
-
_this.popupWrapper.style.left = popupLeft + "px";
|
|
1322
|
-
}
|
|
1323
1319
|
}
|
|
1324
1320
|
else {
|
|
1325
1321
|
_this.popupObj.destroy();
|
|
@@ -3031,10 +3031,6 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3031
3031
|
else {
|
|
3032
3032
|
_this.inputElement.removeAttribute('aria-activedescendant');
|
|
3033
3033
|
}
|
|
3034
|
-
if (_this.enableRtl) {
|
|
3035
|
-
var popupLeft = parseFloat(_this.popupWrapper.style.left) - (_this.popupWrapper.offsetWidth - _this.inputWrapper.container.offsetWidth);
|
|
3036
|
-
_this.popupWrapper.style.left = popupLeft > 0 ? popupLeft + "px" : _this.popupWrapper.style.left;
|
|
3037
|
-
}
|
|
3038
3034
|
addClass([_this.inputWrapper.buttons[0]], ACTIVE);
|
|
3039
3035
|
if (!_this.isMobile) {
|
|
3040
3036
|
if (_this.cancelButton) {
|
|
@@ -317,6 +317,16 @@ export interface TimePickerModel extends ComponentModel{
|
|
|
317
317
|
*/
|
|
318
318
|
maskPlaceholder?: TimeMaskPlaceholderModel;
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* By default, the time value will be processed based on system time zone.
|
|
322
|
+
* If you want to process the initial time value using server time zone
|
|
323
|
+
* then specify the time zone value to `serverTimezoneOffset` property.
|
|
324
|
+
*
|
|
325
|
+
* @default null
|
|
326
|
+
|
|
327
|
+
*/
|
|
328
|
+
serverTimezoneOffset?: number;
|
|
329
|
+
|
|
320
330
|
/**
|
|
321
331
|
* Triggers when the value is changed.
|
|
322
332
|
*
|
|
@@ -422,6 +422,15 @@ export declare class TimePicker extends Component<HTMLElement> implements IInput
|
|
|
422
422
|
* @aspType TimePickerMaskPlaceholder
|
|
423
423
|
*/
|
|
424
424
|
maskPlaceholder: TimeMaskPlaceholderModel;
|
|
425
|
+
/**
|
|
426
|
+
* By default, the time value will be processed based on system time zone.
|
|
427
|
+
* If you want to process the initial time value using server time zone
|
|
428
|
+
* then specify the time zone value to `serverTimezoneOffset` property.
|
|
429
|
+
*
|
|
430
|
+
* @default null
|
|
431
|
+
|
|
432
|
+
*/
|
|
433
|
+
serverTimezoneOffset: number;
|
|
425
434
|
/**
|
|
426
435
|
* Triggers when the value is changed.
|
|
427
436
|
*
|
|
@@ -492,6 +501,8 @@ export declare class TimePicker extends Component<HTMLElement> implements IInput
|
|
|
492
501
|
*/
|
|
493
502
|
protected preRender(): void;
|
|
494
503
|
protected render(): void;
|
|
504
|
+
protected setTimeZone(): void;
|
|
505
|
+
protected isDayLightSaving(): boolean;
|
|
495
506
|
private setTimeAllowEdit;
|
|
496
507
|
private clearIconState;
|
|
497
508
|
private validateDisable;
|
|
@@ -189,6 +189,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
189
189
|
this.validateInterval();
|
|
190
190
|
this.bindEvents();
|
|
191
191
|
this.validateDisable();
|
|
192
|
+
this.setTimeZone();
|
|
192
193
|
this.setValue(this.getFormattedValue(this.value));
|
|
193
194
|
if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType === 'Always' || !this.floatLabelType || !this.placeholder)) {
|
|
194
195
|
this.updateInputValue(this.maskedDateValue);
|
|
@@ -205,6 +206,20 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
205
206
|
}
|
|
206
207
|
this.renderComplete();
|
|
207
208
|
};
|
|
209
|
+
TimePicker.prototype.setTimeZone = function () {
|
|
210
|
+
if (!isNullOrUndefined(this.serverTimezoneOffset) && this.value) {
|
|
211
|
+
var clientTimeZoneDiff = new Date().getTimezoneOffset() / 60;
|
|
212
|
+
var serverTimezoneDiff = this.serverTimezoneOffset;
|
|
213
|
+
var timeZoneDiff = serverTimezoneDiff + clientTimeZoneDiff;
|
|
214
|
+
timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;
|
|
215
|
+
this.value = new Date((this.value).getTime() + (timeZoneDiff * 60 * 60 * 1000));
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
TimePicker.prototype.isDayLightSaving = function () {
|
|
219
|
+
var firstOffset = new Date(this.value.getFullYear(), 0, 1).getTimezoneOffset();
|
|
220
|
+
var secondOffset = new Date(this.value.getFullYear(), 6, 1).getTimezoneOffset();
|
|
221
|
+
return (this.value.getTimezoneOffset() < Math.max(firstOffset, secondOffset));
|
|
222
|
+
};
|
|
208
223
|
TimePicker.prototype.setTimeAllowEdit = function () {
|
|
209
224
|
if (this.allowEdit) {
|
|
210
225
|
if (!this.readonly) {
|
|
@@ -2533,6 +2548,9 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
2533
2548
|
__decorate([
|
|
2534
2549
|
Property({ day: 'day', month: 'month', year: 'year', hour: 'hour', minute: 'minute', second: 'second', dayOfTheWeek: 'day of the week' })
|
|
2535
2550
|
], TimePicker.prototype, "maskPlaceholder", void 0);
|
|
2551
|
+
__decorate([
|
|
2552
|
+
Property(null)
|
|
2553
|
+
], TimePicker.prototype, "serverTimezoneOffset", void 0);
|
|
2536
2554
|
__decorate([
|
|
2537
2555
|
Event()
|
|
2538
2556
|
], TimePicker.prototype, "change", void 0);
|