@syncfusion/ej2-calendars 21.2.9 → 22.1.34
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/.eslintrc.json +1 -0
- package/CHANGELOG.md +7 -31
- 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 +263 -31
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +264 -31
- 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-model.d.ts +1 -1
- package/src/calendar/calendar.d.ts +5 -5
- package/src/calendar/calendar.js +2 -2
- package/src/datepicker/datepicker-model.d.ts +8 -1
- package/src/datepicker/datepicker.d.ts +15 -1
- package/src/datepicker/datepicker.js +81 -9
- package/src/daterangepicker/daterangepicker-model.d.ts +8 -1
- package/src/daterangepicker/daterangepicker.d.ts +13 -0
- package/src/daterangepicker/daterangepicker.js +91 -6
- package/src/datetimepicker/datetimepicker-model.d.ts +8 -1
- package/src/datetimepicker/datetimepicker.d.ts +10 -1
- package/src/datetimepicker/datetimepicker.js +50 -5
- package/src/maskbase/masked-date-time.d.ts +2 -0
- package/src/maskbase/masked-date-time.js +13 -5
- package/src/timepicker/timepicker-model.d.ts +7 -0
- package/src/timepicker/timepicker.d.ts +7 -0
- package/src/timepicker/timepicker.js +28 -5
- package/styles/bootstrap-dark.css +715 -19
- package/styles/bootstrap.css +711 -15
- package/styles/bootstrap4.css +711 -16
- package/styles/bootstrap5-dark.css +708 -12
- package/styles/bootstrap5.css +708 -12
- package/styles/calendar/_bootstrap-dark-definition.scss +1 -1
- package/styles/calendar/_bootstrap4-definition.scss +1 -1
- package/styles/calendar/_layout.scss +64 -19
- package/styles/calendar/_material-definition.scss +1 -1
- package/styles/calendar/_material3-dark-definition.scss +1 -0
- package/styles/calendar/_material3-definition.scss +195 -0
- package/styles/calendar/_theme.scss +2 -1
- package/styles/calendar/bootstrap-dark.css +3 -2
- package/styles/calendar/bootstrap.css +2 -1
- package/styles/calendar/bootstrap4.css +3 -2
- package/styles/calendar/bootstrap5-dark.css +2 -1
- package/styles/calendar/bootstrap5.css +2 -1
- package/styles/calendar/fabric-dark.css +2 -1
- package/styles/calendar/fabric.css +2 -1
- package/styles/calendar/fluent-dark.css +2 -1
- package/styles/calendar/fluent.css +2 -1
- package/styles/calendar/highcontrast-light.css +2 -1
- package/styles/calendar/highcontrast.css +2 -1
- package/styles/calendar/icons/_material3-dark.scss +1 -0
- package/styles/calendar/material-dark.css +2 -1
- package/styles/calendar/material.css +3 -2
- package/styles/calendar/material3-dark.css +895 -0
- package/styles/calendar/material3-dark.scss +6 -0
- package/styles/calendar/material3.css +951 -0
- package/styles/calendar/material3.scss +6 -0
- package/styles/calendar/tailwind-dark.css +2 -1
- package/styles/calendar/tailwind.css +2 -1
- package/styles/datepicker/_bootstrap-dark-definition.scss +71 -11
- package/styles/datepicker/_bootstrap-definition.scss +71 -9
- package/styles/datepicker/_bootstrap4-definition.scss +70 -9
- package/styles/datepicker/_bootstrap5-definition.scss +67 -6
- package/styles/datepicker/_fabric-dark-definition.scss +70 -9
- package/styles/datepicker/_fabric-definition.scss +70 -9
- package/styles/datepicker/_fluent-definition.scss +67 -6
- package/styles/datepicker/_fusionnew-definition.scss +67 -6
- package/styles/datepicker/_highcontrast-definition.scss +69 -8
- package/styles/datepicker/_highcontrast-light-definition.scss +69 -8
- package/styles/datepicker/_layout.scss +214 -66
- package/styles/datepicker/_material-dark-definition.scss +67 -6
- package/styles/datepicker/_material-definition.scss +67 -6
- package/styles/datepicker/_material3-dark-definition.scss +1 -0
- package/styles/datepicker/_material3-definition.scss +116 -0
- package/styles/datepicker/_tailwind-definition.scss +67 -6
- package/styles/datepicker/_theme.scss +0 -1
- package/styles/datepicker/bootstrap-dark.css +262 -8
- package/styles/datepicker/bootstrap.css +262 -8
- package/styles/datepicker/bootstrap4.css +261 -8
- package/styles/datepicker/bootstrap5-dark.css +259 -5
- package/styles/datepicker/bootstrap5.css +259 -5
- package/styles/datepicker/fabric-dark.css +255 -8
- package/styles/datepicker/fabric.css +255 -8
- package/styles/datepicker/fluent-dark.css +258 -5
- package/styles/datepicker/fluent.css +258 -5
- package/styles/datepicker/highcontrast-light.css +260 -7
- package/styles/datepicker/highcontrast.css +260 -7
- package/styles/datepicker/icons/_bootstrap-dark.scss +21 -0
- package/styles/datepicker/icons/_bootstrap.scss +20 -0
- package/styles/datepicker/icons/_bootstrap4.scss +20 -0
- package/styles/datepicker/icons/_bootstrap5.scss +20 -0
- package/styles/datepicker/icons/_fabric-dark.scss +13 -0
- package/styles/datepicker/icons/_fabric.scss +13 -0
- package/styles/datepicker/icons/_fluent.scss +20 -0
- package/styles/datepicker/icons/_fusionnew.scss +20 -0
- package/styles/datepicker/icons/_highcontrast-light.scss +20 -0
- package/styles/datepicker/icons/_highcontrast.scss +20 -0
- package/styles/datepicker/icons/_material-dark.scss +13 -0
- package/styles/datepicker/icons/_material.scss +13 -0
- package/styles/datepicker/icons/_material3-dark.scss +1 -0
- package/styles/datepicker/icons/_material3.scss +23 -0
- package/styles/datepicker/icons/_tailwind.scss +20 -0
- package/styles/datepicker/material-dark.css +252 -5
- package/styles/datepicker/material.css +204 -40
- package/styles/datepicker/material3-dark.css +510 -0
- package/styles/datepicker/material3-dark.scss +8 -0
- package/styles/datepicker/material3.css +566 -0
- package/styles/datepicker/material3.scss +8 -0
- package/styles/datepicker/tailwind-dark.css +258 -5
- package/styles/datepicker/tailwind.css +258 -5
- package/styles/daterangepicker/_bootstrap-dark-definition.scss +67 -2
- package/styles/daterangepicker/_bootstrap-definition.scss +65 -0
- package/styles/daterangepicker/_bootstrap4-definition.scss +65 -0
- package/styles/daterangepicker/_bootstrap5-definition.scss +65 -0
- package/styles/daterangepicker/_fabric-dark-definition.scss +65 -0
- package/styles/daterangepicker/_fabric-definition.scss +65 -0
- package/styles/daterangepicker/_fluent-definition.scss +66 -1
- package/styles/daterangepicker/_fusionnew-definition.scss +65 -0
- package/styles/daterangepicker/_highcontrast-definition.scss +65 -0
- package/styles/daterangepicker/_highcontrast-light-definition.scss +65 -0
- package/styles/daterangepicker/_layout.scss +325 -116
- package/styles/daterangepicker/_material-dark-definition.scss +65 -0
- package/styles/daterangepicker/_material-definition.scss +65 -0
- package/styles/daterangepicker/_material3-dark-definition.scss +1 -0
- package/styles/daterangepicker/_material3-definition.scss +278 -0
- package/styles/daterangepicker/_tailwind-definition.scss +65 -0
- package/styles/daterangepicker/_theme.scss +21 -1
- package/styles/daterangepicker/bootstrap-dark.css +358 -7
- package/styles/daterangepicker/bootstrap.css +355 -4
- package/styles/daterangepicker/bootstrap4.css +355 -4
- package/styles/daterangepicker/bootstrap5-dark.css +355 -4
- package/styles/daterangepicker/bootstrap5.css +355 -4
- package/styles/daterangepicker/fabric-dark.css +355 -4
- package/styles/daterangepicker/fabric.css +355 -4
- package/styles/daterangepicker/fluent-dark.css +356 -5
- package/styles/daterangepicker/fluent.css +356 -5
- package/styles/daterangepicker/highcontrast-light.css +355 -4
- package/styles/daterangepicker/highcontrast.css +355 -4
- package/styles/daterangepicker/icons/_bootstrap-dark.scss +20 -0
- package/styles/daterangepicker/icons/_bootstrap.scss +20 -0
- package/styles/daterangepicker/icons/_bootstrap4.scss +20 -0
- package/styles/daterangepicker/icons/_bootstrap5.scss +20 -0
- package/styles/daterangepicker/icons/_fabric-dark.scss +20 -0
- package/styles/daterangepicker/icons/_fabric.scss +20 -0
- package/styles/daterangepicker/icons/_fluent.scss +20 -0
- package/styles/daterangepicker/icons/_fusionnew.scss +20 -0
- package/styles/daterangepicker/icons/_highcontrast-light.scss +20 -0
- package/styles/daterangepicker/icons/_highcontrast.scss +20 -0
- package/styles/daterangepicker/icons/_material-dark.scss +20 -0
- package/styles/daterangepicker/icons/_material.scss +20 -0
- package/styles/daterangepicker/icons/_material3-dark.scss +1 -0
- package/styles/daterangepicker/icons/_material3.scss +32 -2
- package/styles/daterangepicker/icons/_tailwind.scss +20 -0
- package/styles/daterangepicker/material-dark.css +355 -4
- package/styles/daterangepicker/material.css +309 -70
- package/styles/daterangepicker/material3-dark.css +1330 -0
- package/styles/daterangepicker/material3-dark.scss +8 -0
- package/styles/daterangepicker/material3.css +1386 -0
- package/styles/daterangepicker/material3.scss +8 -0
- package/styles/daterangepicker/tailwind-dark.css +355 -4
- package/styles/daterangepicker/tailwind.css +355 -4
- package/styles/datetimepicker/_bootstrap-dark-definition.scss +5 -0
- package/styles/datetimepicker/_bootstrap-definition.scss +5 -0
- package/styles/datetimepicker/_bootstrap4-definition.scss +5 -0
- package/styles/datetimepicker/_bootstrap5-definition.scss +5 -0
- package/styles/datetimepicker/_fabric-dark-definition.scss +5 -0
- package/styles/datetimepicker/_fabric-definition.scss +5 -0
- package/styles/datetimepicker/_fluent-definition.scss +5 -0
- package/styles/datetimepicker/_fusionnew-definition.scss +5 -0
- package/styles/datetimepicker/_highcontrast-definition.scss +5 -0
- package/styles/datetimepicker/_highcontrast-light-definition.scss +5 -0
- package/styles/datetimepicker/_layout.scss +47 -4
- package/styles/datetimepicker/_material-dark-definition.scss +5 -0
- package/styles/datetimepicker/_material-definition.scss +5 -0
- package/styles/datetimepicker/_material3-dark-definition.scss +1 -0
- package/styles/datetimepicker/_material3-definition.scss +71 -0
- package/styles/datetimepicker/_tailwind-definition.scss +5 -0
- package/styles/datetimepicker/bootstrap-dark.css +8 -2
- package/styles/datetimepicker/bootstrap.css +8 -2
- package/styles/datetimepicker/bootstrap4.css +8 -2
- package/styles/datetimepicker/bootstrap5-dark.css +8 -2
- package/styles/datetimepicker/bootstrap5.css +8 -2
- package/styles/datetimepicker/fabric-dark.css +8 -2
- package/styles/datetimepicker/fabric.css +8 -2
- package/styles/datetimepicker/fluent-dark.css +8 -2
- package/styles/datetimepicker/fluent.css +8 -2
- package/styles/datetimepicker/highcontrast-light.css +8 -2
- package/styles/datetimepicker/highcontrast.css +8 -2
- package/styles/datetimepicker/icons/_material3-dark.scss +1 -0
- package/styles/datetimepicker/material-dark.css +8 -2
- package/styles/datetimepicker/material.css +8 -2
- package/styles/datetimepicker/material3-dark.css +283 -0
- package/styles/datetimepicker/material3-dark.scss +9 -0
- package/styles/datetimepicker/material3.css +339 -0
- package/styles/datetimepicker/material3.scss +9 -0
- package/styles/datetimepicker/tailwind-dark.css +8 -2
- package/styles/datetimepicker/tailwind.css +8 -2
- package/styles/fabric-dark.css +704 -15
- package/styles/fabric.css +704 -15
- package/styles/fluent-dark.css +708 -13
- package/styles/fluent.css +708 -13
- package/styles/highcontrast-light.css +709 -14
- package/styles/highcontrast.css +709 -14
- package/styles/material-dark.css +701 -12
- package/styles/material.css +608 -114
- package/styles/material3-dark.css +3179 -0
- package/styles/material3-dark.scss +7 -0
- package/styles/material3.css +3235 -0
- package/styles/material3.scss +7 -0
- package/styles/tailwind-dark.css +707 -12
- package/styles/tailwind.css +707 -12
- package/styles/timepicker/_bootstrap-dark-definition.scss +28 -0
- package/styles/timepicker/_bootstrap-definition.scss +28 -0
- package/styles/timepicker/_bootstrap4-definition.scss +28 -0
- package/styles/timepicker/_bootstrap5-definition.scss +28 -0
- package/styles/timepicker/_fabric-dark-definition.scss +28 -0
- package/styles/timepicker/_fabric-definition.scss +28 -0
- package/styles/timepicker/_fluent-definition.scss +28 -0
- package/styles/timepicker/_fusionnew-definition.scss +28 -0
- package/styles/timepicker/_highcontrast-definition.scss +28 -0
- package/styles/timepicker/_highcontrast-light-definition.scss +28 -0
- package/styles/timepicker/_layout.scss +86 -1
- package/styles/timepicker/_material-dark-definition.scss +28 -0
- package/styles/timepicker/_material-definition.scss +28 -0
- package/styles/timepicker/_material3-dark-definition.scss +1 -0
- package/styles/timepicker/_material3-definition.scss +99 -0
- package/styles/timepicker/_tailwind-definition.scss +28 -0
- package/styles/timepicker/_theme.scss +13 -0
- package/styles/timepicker/bootstrap-dark.css +84 -0
- package/styles/timepicker/bootstrap.css +84 -0
- package/styles/timepicker/bootstrap4.css +84 -0
- package/styles/timepicker/bootstrap5-dark.css +84 -0
- package/styles/timepicker/bootstrap5.css +84 -0
- package/styles/timepicker/fabric-dark.css +84 -0
- package/styles/timepicker/fabric.css +84 -0
- package/styles/timepicker/fluent-dark.css +84 -0
- package/styles/timepicker/fluent.css +84 -0
- package/styles/timepicker/highcontrast-light.css +84 -0
- package/styles/timepicker/highcontrast.css +84 -0
- package/styles/timepicker/icons/_bootstrap-dark.scss +12 -0
- package/styles/timepicker/icons/_bootstrap.scss +12 -0
- package/styles/timepicker/icons/_bootstrap4.scss +12 -0
- package/styles/timepicker/icons/_bootstrap5.scss +12 -0
- package/styles/timepicker/icons/_fabric-dark.scss +12 -0
- package/styles/timepicker/icons/_fabric.scss +12 -0
- package/styles/timepicker/icons/_fluent.scss +12 -0
- package/styles/timepicker/icons/_fusionnew.scss +12 -0
- package/styles/timepicker/icons/_highcontrast-light.scss +12 -0
- package/styles/timepicker/icons/_highcontrast.scss +12 -0
- package/styles/timepicker/icons/_material-dark.scss +12 -0
- package/styles/timepicker/icons/_material.scss +12 -0
- package/styles/timepicker/icons/_material3-dark.scss +1 -0
- package/styles/timepicker/icons/_material3.scss +12 -0
- package/styles/timepicker/icons/_tailwind.scss +12 -0
- package/styles/timepicker/material-dark.css +84 -0
- package/styles/timepicker/material.css +84 -0
- package/styles/timepicker/material3-dark.css +382 -0
- package/styles/timepicker/material3-dark.scss +7 -0
- package/styles/timepicker/material3.css +438 -0
- package/styles/timepicker/material3.scss +7 -0
- package/styles/timepicker/tailwind-dark.css +84 -0
- package/styles/timepicker/tailwind.css +84 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Animation, Browser, ChildProperty, Collection, Component, Event, EventHandler, HijriParser, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, addClass, append, attributes, cldrData, closest, createElement, detach, extend, formatUnit, getDefaultDateObject, getUniqueID, getValue, isNullOrUndefined, isUndefined, merge, prepend, remove, removeClass, rippleEffect, select, setStyleAttribute, setValue, throwError } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Animation, Browser, ChildProperty, Collection, Component, Event, EventHandler, HijriParser, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, Touch, addClass, append, attributes, cldrData, closest, createElement, detach, extend, formatUnit, getDefaultDateObject, getUniqueID, getValue, isNullOrUndefined, isUndefined, merge, prepend, remove, removeClass, rippleEffect, select, setStyleAttribute, setValue, throwError } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
3
3
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
4
4
|
import { Button } from '@syncfusion/ej2-buttons';
|
|
@@ -1525,7 +1525,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
};
|
|
1527
1527
|
CalendarBase.prototype.navigatePrevious = function (e) {
|
|
1528
|
-
e.preventDefault();
|
|
1528
|
+
!Browser.isDevice && e.preventDefault();
|
|
1529
1529
|
if (this.calendarMode === 'Gregorian') {
|
|
1530
1530
|
this.previous();
|
|
1531
1531
|
}
|
|
@@ -1556,7 +1556,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
};
|
|
1558
1558
|
CalendarBase.prototype.navigateNext = function (eve) {
|
|
1559
|
-
eve.preventDefault();
|
|
1559
|
+
!Browser.isDevice && eve.preventDefault();
|
|
1560
1560
|
if (this.calendarMode === 'Gregorian') {
|
|
1561
1561
|
this.next();
|
|
1562
1562
|
}
|
|
@@ -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
|
}
|
|
@@ -3256,7 +3257,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3256
3257
|
DatePicker.prototype.render = function () {
|
|
3257
3258
|
this.initialize();
|
|
3258
3259
|
this.bindEvents();
|
|
3259
|
-
|
|
3260
|
+
if (this.floatLabelType === 'Auto') {
|
|
3261
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
3262
|
+
}
|
|
3260
3263
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
3261
3264
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
3262
3265
|
}
|
|
@@ -3339,6 +3342,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3339
3342
|
this.l10n = new L10n('datepicker', l10nLocale, this.locale);
|
|
3340
3343
|
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
3341
3344
|
}
|
|
3345
|
+
if (this.fullScreenMode && Browser.isDevice) {
|
|
3346
|
+
this.cssClass = "e-popup-expand";
|
|
3347
|
+
}
|
|
3342
3348
|
var updatedCssClassValues = this.cssClass;
|
|
3343
3349
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
3344
3350
|
updatedCssClassValues = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
@@ -3377,11 +3383,12 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3377
3383
|
Input.addAttributes({ 'aria-label': 'select' }, this.inputWrapper.buttons[0]);
|
|
3378
3384
|
addClass([this.inputWrapper.container], DATEWRAPPER);
|
|
3379
3385
|
};
|
|
3380
|
-
DatePicker.prototype.updateInput = function (isDynamic) {
|
|
3386
|
+
DatePicker.prototype.updateInput = function (isDynamic, isBlur) {
|
|
3381
3387
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
3388
|
+
if (isBlur === void 0) { isBlur = false; }
|
|
3382
3389
|
var formatOptions;
|
|
3383
3390
|
if (this.value && !this.isCalendar()) {
|
|
3384
|
-
this.disabledDates(isDynamic);
|
|
3391
|
+
this.disabledDates(isDynamic, isBlur);
|
|
3385
3392
|
}
|
|
3386
3393
|
if (isNaN(+new Date(this.checkValue(this.value)))) {
|
|
3387
3394
|
this.setProperties({ value: null }, true);
|
|
@@ -3864,7 +3871,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3864
3871
|
this.invalidValueString = null;
|
|
3865
3872
|
this.updateInputValue('');
|
|
3866
3873
|
}
|
|
3867
|
-
this.
|
|
3874
|
+
this.isBlur = true;
|
|
3875
|
+
this.updateInput(false, true);
|
|
3876
|
+
this.isBlur = false;
|
|
3868
3877
|
this.popupUpdate();
|
|
3869
3878
|
this.changeTrigger(e);
|
|
3870
3879
|
if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {
|
|
@@ -4137,6 +4146,13 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4137
4146
|
zIndex: this.zIndex,
|
|
4138
4147
|
collision: Browser.isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },
|
|
4139
4148
|
open: function () {
|
|
4149
|
+
if (Browser.isDevice && _this.fullScreenMode) {
|
|
4150
|
+
_this.iconRight = parseInt(window.getComputedStyle(_this.calendarElement.querySelector('.e-header.e-month .e-prev')).marginRight, 10) > 16 ? true : false;
|
|
4151
|
+
_this.touchModule = new Touch(_this.calendarElement.querySelector(".e-content.e-month"), {
|
|
4152
|
+
swipe: _this.CalendarSwipeHandler.bind(_this)
|
|
4153
|
+
});
|
|
4154
|
+
EventHandler.add(_this.calendarElement.querySelector(".e-content.e-month"), "touchstart", _this.TouchStartHandler, _this);
|
|
4155
|
+
}
|
|
4140
4156
|
if (_this.getModuleName() !== 'datetimepicker') {
|
|
4141
4157
|
if (document.activeElement !== _this.inputElement) {
|
|
4142
4158
|
_this.defaultKeyConfigs = extend(_this.defaultKeyConfigs, _this.keyConfigs);
|
|
@@ -4178,6 +4194,45 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4178
4194
|
this.popupObj.element.className += ' ' + this.cssClass;
|
|
4179
4195
|
this.setAriaAttributes();
|
|
4180
4196
|
};
|
|
4197
|
+
DatePicker.prototype.CalendarSwipeHandler = function (e) {
|
|
4198
|
+
var direction = 0;
|
|
4199
|
+
if (this.iconRight) {
|
|
4200
|
+
switch (e.swipeDirection) {
|
|
4201
|
+
case "Left":
|
|
4202
|
+
direction = 1;
|
|
4203
|
+
break;
|
|
4204
|
+
case "Right":
|
|
4205
|
+
direction = -1;
|
|
4206
|
+
break;
|
|
4207
|
+
default:
|
|
4208
|
+
break;
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
4211
|
+
else {
|
|
4212
|
+
switch (e.swipeDirection) {
|
|
4213
|
+
case "Up":
|
|
4214
|
+
direction = 1;
|
|
4215
|
+
break;
|
|
4216
|
+
case "Down":
|
|
4217
|
+
direction = -1;
|
|
4218
|
+
break;
|
|
4219
|
+
default:
|
|
4220
|
+
break;
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4223
|
+
if (this.touchStart) {
|
|
4224
|
+
if (direction === 1) {
|
|
4225
|
+
this.navigateNext(e);
|
|
4226
|
+
}
|
|
4227
|
+
else if (direction === -1) {
|
|
4228
|
+
this.navigatePrevious(e);
|
|
4229
|
+
}
|
|
4230
|
+
this.touchStart = false;
|
|
4231
|
+
}
|
|
4232
|
+
};
|
|
4233
|
+
DatePicker.prototype.TouchStartHandler = function (e) {
|
|
4234
|
+
this.touchStart = true;
|
|
4235
|
+
};
|
|
4181
4236
|
DatePicker.prototype.setAriaDisabled = function () {
|
|
4182
4237
|
if (!this.enabled) {
|
|
4183
4238
|
this.inputElement.setAttribute('aria-disabled', 'true');
|
|
@@ -4216,12 +4271,25 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4216
4271
|
dateOptions = { format: 'MMM d', skeleton: 'dateTime', calendar: 'islamic' };
|
|
4217
4272
|
}
|
|
4218
4273
|
monthSpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);
|
|
4219
|
-
|
|
4274
|
+
if (this.fullScreenMode) {
|
|
4275
|
+
var modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
4276
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelCloseHandler, this);
|
|
4277
|
+
var modelTodayButton = this.calendarElement.querySelector("button.e-today");
|
|
4278
|
+
h2.classList.add("e-day-wrapper");
|
|
4279
|
+
modelTodayButton.classList.add("e-outline");
|
|
4280
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
4281
|
+
modelHeader.appendChild(modelTodayButton);
|
|
4282
|
+
}
|
|
4283
|
+
if (!this.fullScreenMode)
|
|
4284
|
+
modelHeader.appendChild(yearHeading);
|
|
4220
4285
|
h2.appendChild(daySpan);
|
|
4221
4286
|
h2.appendChild(monthSpan);
|
|
4222
4287
|
modelHeader.appendChild(h2);
|
|
4223
4288
|
this.calendarElement.insertBefore(modelHeader, this.calendarElement.firstElementChild);
|
|
4224
4289
|
};
|
|
4290
|
+
DatePicker.prototype.modelCloseHandler = function (e) {
|
|
4291
|
+
this.hide();
|
|
4292
|
+
};
|
|
4225
4293
|
DatePicker.prototype.changeTrigger = function (event) {
|
|
4226
4294
|
if (this.inputElement.value !== this.previousElementValue) {
|
|
4227
4295
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -4248,7 +4316,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4248
4316
|
this.trigger('navigated', this.navigatedArgs);
|
|
4249
4317
|
};
|
|
4250
4318
|
DatePicker.prototype.changeEvent = function (event) {
|
|
4251
|
-
if (!this.isIconClicked) {
|
|
4319
|
+
if (!this.isIconClicked && !this.isBlur) {
|
|
4252
4320
|
this.selectCalendar(event);
|
|
4253
4321
|
}
|
|
4254
4322
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -4822,8 +4890,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4822
4890
|
DatePicker.prototype.getModuleName = function () {
|
|
4823
4891
|
return 'datepicker';
|
|
4824
4892
|
};
|
|
4825
|
-
DatePicker.prototype.disabledDates = function (isDynamic) {
|
|
4893
|
+
DatePicker.prototype.disabledDates = function (isDynamic, isBlur) {
|
|
4826
4894
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
4895
|
+
if (isBlur === void 0) { isBlur = false; }
|
|
4827
4896
|
var formatOptions;
|
|
4828
4897
|
var globalize;
|
|
4829
4898
|
var valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));
|
|
@@ -4878,7 +4947,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4878
4947
|
if (this.enableMask) {
|
|
4879
4948
|
this.updateInputValue(this.maskedDateValue);
|
|
4880
4949
|
this.notify('createMask', {
|
|
4881
|
-
module: 'MaskedDateTime'
|
|
4950
|
+
module: 'MaskedDateTime', isBlur: isBlur
|
|
4882
4951
|
});
|
|
4883
4952
|
}
|
|
4884
4953
|
}
|
|
@@ -5083,6 +5152,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5083
5152
|
__decorate$1([
|
|
5084
5153
|
Property(true)
|
|
5085
5154
|
], DatePicker.prototype, "enabled", void 0);
|
|
5155
|
+
__decorate$1([
|
|
5156
|
+
Property(false)
|
|
5157
|
+
], DatePicker.prototype, "fullScreenMode", void 0);
|
|
5086
5158
|
__decorate$1([
|
|
5087
5159
|
Property({})
|
|
5088
5160
|
], DatePicker.prototype, "htmlAttributes", void 0);
|
|
@@ -5316,7 +5388,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5316
5388
|
if (this.element.hasAttribute('data-val')) {
|
|
5317
5389
|
this.element.setAttribute('data-val', 'false');
|
|
5318
5390
|
}
|
|
5319
|
-
|
|
5391
|
+
if (this.floatLabelType === 'Auto') {
|
|
5392
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
5393
|
+
}
|
|
5320
5394
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
5321
5395
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
5322
5396
|
}
|
|
@@ -5356,7 +5430,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5356
5430
|
/**
|
|
5357
5431
|
* Mobile View
|
|
5358
5432
|
*/
|
|
5359
|
-
this.isMobile = window.matchMedia('(max-width:550px)').matches;
|
|
5433
|
+
this.isMobile = (Browser.isDevice && this.fullScreenMode) ? true : window.matchMedia('(max-width:550px)').matches;
|
|
5360
5434
|
this.inputElement = this.element;
|
|
5361
5435
|
this.angularTag = null;
|
|
5362
5436
|
if (this.element.tagName === 'EJS-DATERANGEPICKER') {
|
|
@@ -5692,7 +5766,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5692
5766
|
};
|
|
5693
5767
|
DateRangePicker.prototype.updateHiddenInput = function () {
|
|
5694
5768
|
if (this.firstHiddenChild && this.secondHiddenChild) {
|
|
5695
|
-
var format = { type: 'datetime', skeleton: 'yMd' };
|
|
5769
|
+
var format = { format: this.formatString, type: 'datetime', skeleton: 'yMd' };
|
|
5696
5770
|
if (typeof this.startDate === 'string') {
|
|
5697
5771
|
this.startDate = this.globalize.parseDate(this.startDate, format);
|
|
5698
5772
|
}
|
|
@@ -6102,7 +6176,6 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
6102
6176
|
this.trigger('focus', focusArguments);
|
|
6103
6177
|
}
|
|
6104
6178
|
this.updateClearIconState();
|
|
6105
|
-
this.updateHiddenInput();
|
|
6106
6179
|
if (this.openOnFocus && !this.preventFocus) {
|
|
6107
6180
|
this.preventFocus = true;
|
|
6108
6181
|
this.show();
|
|
@@ -7833,6 +7906,16 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
7833
7906
|
DateRangePicker.prototype.createControl = function () {
|
|
7834
7907
|
var controlContainer = this.createElement('div', { className: RANGECONTAINER });
|
|
7835
7908
|
var headerContainer = this.createElement('div', { className: RANGEHEADER });
|
|
7909
|
+
if (this.isMobile && this.fullScreenMode) {
|
|
7910
|
+
var modelHeaderIconWrapper = this.createElement("div", { className: "e-model-header-wrapper" });
|
|
7911
|
+
var modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
7912
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
7913
|
+
var modelApplyButton = this.createElement("span", { className: "e-apply" });
|
|
7914
|
+
EventHandler.add(modelApplyButton, 'mousedown touchstart', this.applyFunction, this);
|
|
7915
|
+
modelHeaderIconWrapper.appendChild(modelCloseIcon);
|
|
7916
|
+
modelHeaderIconWrapper.appendChild(modelApplyButton);
|
|
7917
|
+
headerContainer.appendChild(modelHeaderIconWrapper);
|
|
7918
|
+
}
|
|
7836
7919
|
var labelContainer = this.createRangeHeader();
|
|
7837
7920
|
headerContainer.appendChild(labelContainer);
|
|
7838
7921
|
var daySpan = this.createElement('div', { className: DAYSPAN });
|
|
@@ -7872,6 +7955,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
7872
7955
|
}
|
|
7873
7956
|
this.renderPopup();
|
|
7874
7957
|
};
|
|
7958
|
+
DateRangePicker.prototype.modelRangeCloseHandler = function (e) {
|
|
7959
|
+
this.hide();
|
|
7960
|
+
};
|
|
7875
7961
|
DateRangePicker.prototype.cancelFunction = function (eve) {
|
|
7876
7962
|
if (document.activeElement !== this.inputElement) {
|
|
7877
7963
|
this.preventFocus = true;
|
|
@@ -8085,7 +8171,24 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
8085
8171
|
this.liCollections = this.presetElement.querySelectorAll('.' + LISTCLASS);
|
|
8086
8172
|
this.wireListEvents();
|
|
8087
8173
|
if (this.isMobile) {
|
|
8088
|
-
|
|
8174
|
+
if (this.fullScreenMode) {
|
|
8175
|
+
var modelWrapper = createElement('div', { className: 'e-range-mob-popup-wrap' });
|
|
8176
|
+
var modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
8177
|
+
var modelTitleSpan = this.createElement("span", { className: "e-model-title" });
|
|
8178
|
+
modelTitleSpan.textContent = "Select Preset";
|
|
8179
|
+
var modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
8180
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
8181
|
+
var presetContent = this.presetElement;
|
|
8182
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
8183
|
+
modelHeader.appendChild(modelTitleSpan);
|
|
8184
|
+
modelWrapper.appendChild(modelHeader);
|
|
8185
|
+
modelWrapper.appendChild(presetContent);
|
|
8186
|
+
this.popupWrapper.insertBefore(modelWrapper, this.popupWrapper.firstElementChild);
|
|
8187
|
+
this.presetElement.style.width = '100%';
|
|
8188
|
+
}
|
|
8189
|
+
else {
|
|
8190
|
+
this.presetElement.style.width = this.inputWrapper.container.getBoundingClientRect().width + 'px';
|
|
8191
|
+
}
|
|
8089
8192
|
}
|
|
8090
8193
|
if (!isNullOrUndefined(this.activeIndex) && this.activeIndex > -1) {
|
|
8091
8194
|
addClass([this.liCollections[this.activeIndex]], ACTIVE$1);
|
|
@@ -8135,6 +8238,15 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
8135
8238
|
enableRtl: this.enableRtl,
|
|
8136
8239
|
zIndex: this.zIndex,
|
|
8137
8240
|
open: function () {
|
|
8241
|
+
if (_this.isMobile && _this.fullScreenMode) {
|
|
8242
|
+
_this.iconRangeRight = _this.calendarElement && window.getComputedStyle(_this.calendarElement.querySelector('.e-header.e-month .e-prev')).cssFloat;
|
|
8243
|
+
if (_this.iconRangeRight) {
|
|
8244
|
+
_this.touchRangeModule = new Touch(_this.calendarElement.querySelector(".e-content.e-month"), {
|
|
8245
|
+
swipe: _this.dateRangeSwipeHandler.bind(_this)
|
|
8246
|
+
});
|
|
8247
|
+
EventHandler.add(_this.calendarElement.querySelector(".e-content.e-month"), "touchstart", _this.touchStartRangeHandler, _this);
|
|
8248
|
+
}
|
|
8249
|
+
}
|
|
8138
8250
|
attributes(_this.inputElement, { 'aria-expanded': 'true', 'aria-owns': _this.inputElement.id + '_options' });
|
|
8139
8251
|
if (_this.value) {
|
|
8140
8252
|
attributes(_this.inputElement, { 'aria-activedescendant': _this.inputElement.id });
|
|
@@ -8227,6 +8339,45 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
8227
8339
|
}
|
|
8228
8340
|
EventHandler.add(document, 'mousedown touchstart', this.documentHandler, this);
|
|
8229
8341
|
};
|
|
8342
|
+
DateRangePicker.prototype.dateRangeSwipeHandler = function (e) {
|
|
8343
|
+
var direction = 0;
|
|
8344
|
+
if (this.iconRangeRight == 'left') {
|
|
8345
|
+
switch (e.swipeDirection) {
|
|
8346
|
+
case "Left":
|
|
8347
|
+
direction = 1;
|
|
8348
|
+
break;
|
|
8349
|
+
case "Right":
|
|
8350
|
+
direction = -1;
|
|
8351
|
+
break;
|
|
8352
|
+
default:
|
|
8353
|
+
break;
|
|
8354
|
+
}
|
|
8355
|
+
}
|
|
8356
|
+
else {
|
|
8357
|
+
switch (e.swipeDirection) {
|
|
8358
|
+
case "Up":
|
|
8359
|
+
direction = 1;
|
|
8360
|
+
break;
|
|
8361
|
+
case "Down":
|
|
8362
|
+
direction = -1;
|
|
8363
|
+
break;
|
|
8364
|
+
default:
|
|
8365
|
+
break;
|
|
8366
|
+
}
|
|
8367
|
+
}
|
|
8368
|
+
if (this.touchRangeStart) {
|
|
8369
|
+
if (direction === 1) {
|
|
8370
|
+
this.navigateNext(e);
|
|
8371
|
+
}
|
|
8372
|
+
else if (direction === -1) {
|
|
8373
|
+
this.navigatePrevious(e);
|
|
8374
|
+
}
|
|
8375
|
+
this.touchRangeStart = false;
|
|
8376
|
+
}
|
|
8377
|
+
};
|
|
8378
|
+
DateRangePicker.prototype.touchStartRangeHandler = function (e) {
|
|
8379
|
+
this.touchRangeStart = true;
|
|
8380
|
+
};
|
|
8230
8381
|
DateRangePicker.prototype.popupCloseHandler = function (e) {
|
|
8231
8382
|
switch (e.keyCode) {
|
|
8232
8383
|
case 27:
|
|
@@ -8478,6 +8629,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
8478
8629
|
}
|
|
8479
8630
|
};
|
|
8480
8631
|
DateRangePicker.prototype.createInput = function () {
|
|
8632
|
+
if (this.fullScreenMode && this.isMobile) {
|
|
8633
|
+
this.cssClass = "e-popup-expand";
|
|
8634
|
+
}
|
|
8481
8635
|
var updatedCssClassValue = this.cssClass;
|
|
8482
8636
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
8483
8637
|
updatedCssClassValue = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
@@ -9569,6 +9723,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9569
9723
|
__decorate$2([
|
|
9570
9724
|
Property(false)
|
|
9571
9725
|
], DateRangePicker.prototype, "openOnFocus", void 0);
|
|
9726
|
+
__decorate$2([
|
|
9727
|
+
Property(false)
|
|
9728
|
+
], DateRangePicker.prototype, "fullScreenMode", void 0);
|
|
9572
9729
|
__decorate$2([
|
|
9573
9730
|
Event()
|
|
9574
9731
|
], DateRangePicker.prototype, "created", void 0);
|
|
@@ -9997,6 +10154,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9997
10154
|
return (!isNullOrUndefined(value) && value instanceof Date && !isNaN(+value)) ? value : null;
|
|
9998
10155
|
};
|
|
9999
10156
|
TimePicker.prototype.createInputElement = function () {
|
|
10157
|
+
if (this.fullScreenMode && Browser.isDevice) {
|
|
10158
|
+
this.cssClass = "e-popup-expand";
|
|
10159
|
+
}
|
|
10000
10160
|
var updatedCssClassesValue = this.cssClass;
|
|
10001
10161
|
var isBindClearAction = this.enableMask ? false : true;
|
|
10002
10162
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
@@ -10244,7 +10404,26 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
10244
10404
|
if (!Browser.isDevice) {
|
|
10245
10405
|
this.popupObj.collision = { X: 'none', Y: 'flip' };
|
|
10246
10406
|
}
|
|
10247
|
-
this.
|
|
10407
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
10408
|
+
this.popupObj.element.style.maxHeight = "100%";
|
|
10409
|
+
this.popupObj.element.style.width = "100%";
|
|
10410
|
+
}
|
|
10411
|
+
else {
|
|
10412
|
+
this.popupObj.element.style.maxHeight = POPUPDIMENSION;
|
|
10413
|
+
}
|
|
10414
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
10415
|
+
var modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
10416
|
+
var modelTitleSpan = this.createElement("span", { className: "e-model-title" });
|
|
10417
|
+
modelTitleSpan.textContent = "Select time";
|
|
10418
|
+
var modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
10419
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.timePopupCloseHandler, this);
|
|
10420
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
10421
|
+
modelHeader.appendChild(modelTitleSpan);
|
|
10422
|
+
this.popupWrapper.insertBefore(modelHeader, this.popupWrapper.firstElementChild);
|
|
10423
|
+
}
|
|
10424
|
+
};
|
|
10425
|
+
TimePicker.prototype.timePopupCloseHandler = function (e) {
|
|
10426
|
+
this.hide();
|
|
10248
10427
|
};
|
|
10249
10428
|
//util function
|
|
10250
10429
|
TimePicker.prototype.getFormattedValue = function (value) {
|
|
@@ -10806,9 +10985,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
10806
10985
|
if (this.isValidLI(li)) {
|
|
10807
10986
|
this.checkValue(li.getAttribute('data-value'));
|
|
10808
10987
|
if (this.enableMask) {
|
|
10809
|
-
this.
|
|
10810
|
-
module: 'MaskedDateTime', navigated: true
|
|
10811
|
-
});
|
|
10988
|
+
this.createMask();
|
|
10812
10989
|
}
|
|
10813
10990
|
this.selectedElement = li;
|
|
10814
10991
|
this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);
|
|
@@ -11490,7 +11667,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11490
11667
|
this.prevDate = this.valueWithMinutes = date;
|
|
11491
11668
|
if ((typeof date !== 'number') || (this.value && +new Date(+this.value).setMilliseconds(0)) !== +date) {
|
|
11492
11669
|
this.setProperties({ value: date }, true);
|
|
11493
|
-
if (this.enableMask) {
|
|
11670
|
+
if (this.enableMask && this.value) {
|
|
11494
11671
|
this.createMask();
|
|
11495
11672
|
}
|
|
11496
11673
|
}
|
|
@@ -12130,6 +12307,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12130
12307
|
__decorate$3([
|
|
12131
12308
|
Property(true)
|
|
12132
12309
|
], TimePicker.prototype, "enabled", void 0);
|
|
12310
|
+
__decorate$3([
|
|
12311
|
+
Property(false)
|
|
12312
|
+
], TimePicker.prototype, "fullScreenMode", void 0);
|
|
12133
12313
|
__decorate$3([
|
|
12134
12314
|
Property(false)
|
|
12135
12315
|
], TimePicker.prototype, "readonly", void 0);
|
|
@@ -12438,7 +12618,9 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12438
12618
|
this.inputElement.tabIndex = -1;
|
|
12439
12619
|
}
|
|
12440
12620
|
}
|
|
12441
|
-
|
|
12621
|
+
if (this.floatLabelType === 'Auto') {
|
|
12622
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
12623
|
+
}
|
|
12442
12624
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
12443
12625
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');
|
|
12444
12626
|
}
|
|
@@ -12759,7 +12941,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12759
12941
|
this.renderPopup();
|
|
12760
12942
|
this.setTimeScrollPosition();
|
|
12761
12943
|
this.openPopup(e);
|
|
12762
|
-
|
|
12944
|
+
if (!Browser.isDevice || (Browser.isDevice && !this.fullScreenMode)) {
|
|
12945
|
+
this.popupObject.refreshPosition(this.inputElement);
|
|
12946
|
+
}
|
|
12947
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
12948
|
+
this.dateTimeWrapper.style.left = '0px';
|
|
12949
|
+
}
|
|
12763
12950
|
}
|
|
12764
12951
|
}
|
|
12765
12952
|
};
|
|
@@ -12865,7 +13052,31 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12865
13052
|
}
|
|
12866
13053
|
}
|
|
12867
13054
|
});
|
|
12868
|
-
this.
|
|
13055
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
13056
|
+
this.popupObject.element.style.display = "flex";
|
|
13057
|
+
this.popupObject.element.style.maxHeight = "100%";
|
|
13058
|
+
this.popupObject.element.style.width = "100%";
|
|
13059
|
+
}
|
|
13060
|
+
else {
|
|
13061
|
+
this.popupObject.element.style.maxHeight = POPUPDIMENSION$1;
|
|
13062
|
+
}
|
|
13063
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
13064
|
+
var modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
|
|
13065
|
+
var modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
13066
|
+
var modelTitleSpan = this.createElement("span", { className: "e-model-title" });
|
|
13067
|
+
modelTitleSpan.textContent = "Select time";
|
|
13068
|
+
var modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
13069
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.dateTimeCloseHandler, this);
|
|
13070
|
+
var timeContent = this.dateTimeWrapper.querySelector(".e-content");
|
|
13071
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
13072
|
+
modelHeader.appendChild(modelTitleSpan);
|
|
13073
|
+
modelWrapper.appendChild(modelHeader);
|
|
13074
|
+
modelWrapper.appendChild(timeContent);
|
|
13075
|
+
this.dateTimeWrapper.insertBefore(modelWrapper, this.dateTimeWrapper.firstElementChild);
|
|
13076
|
+
}
|
|
13077
|
+
};
|
|
13078
|
+
DateTimePicker.prototype.dateTimeCloseHandler = function (e) {
|
|
13079
|
+
this.hide();
|
|
12869
13080
|
};
|
|
12870
13081
|
DateTimePicker.prototype.setDimension = function (width) {
|
|
12871
13082
|
if (typeof width === 'number') {
|
|
@@ -12921,7 +13132,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12921
13132
|
DateTimePicker.prototype.getPopupHeight = function () {
|
|
12922
13133
|
var height = parseInt(POPUPDIMENSION$1, 10);
|
|
12923
13134
|
var popupHeight = this.dateTimeWrapper.getBoundingClientRect().height;
|
|
12924
|
-
|
|
13135
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
13136
|
+
return popupHeight;
|
|
13137
|
+
}
|
|
13138
|
+
else {
|
|
13139
|
+
return popupHeight > height ? height : popupHeight;
|
|
13140
|
+
}
|
|
12925
13141
|
};
|
|
12926
13142
|
DateTimePicker.prototype.changeEvent = function (e) {
|
|
12927
13143
|
_super.prototype.changeEvent.call(this, e);
|
|
@@ -12959,7 +13175,13 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12959
13175
|
var height = nextElement ? nextElement.offsetTop : element.offsetTop;
|
|
12960
13176
|
var lineHeight = element.getBoundingClientRect().height;
|
|
12961
13177
|
if ((height + element.offsetTop) > listHeight) {
|
|
12962
|
-
|
|
13178
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
13179
|
+
var listContent = this.dateTimeWrapper.querySelector('.e-content');
|
|
13180
|
+
listContent.scrollTop = nextElement ? (height - (listHeight / HALFPOSITION$1 + lineHeight / HALFPOSITION$1)) : height;
|
|
13181
|
+
}
|
|
13182
|
+
else {
|
|
13183
|
+
this.dateTimeWrapper.scrollTop = nextElement ? (height - (listHeight / HALFPOSITION$1 + lineHeight / HALFPOSITION$1)) : height;
|
|
13184
|
+
}
|
|
12963
13185
|
}
|
|
12964
13186
|
else {
|
|
12965
13187
|
this.dateTimeWrapper.scrollTop = 0;
|
|
@@ -13747,6 +13969,9 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13747
13969
|
__decorate$4([
|
|
13748
13970
|
Property(false)
|
|
13749
13971
|
], DateTimePicker.prototype, "strictMode", void 0);
|
|
13972
|
+
__decorate$4([
|
|
13973
|
+
Property(false)
|
|
13974
|
+
], DateTimePicker.prototype, "fullScreenMode", void 0);
|
|
13750
13975
|
__decorate$4([
|
|
13751
13976
|
Property(null)
|
|
13752
13977
|
], DateTimePicker.prototype, "serverTimezoneOffset", void 0);
|
|
@@ -13852,6 +14077,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13852
14077
|
this.isComplete = false;
|
|
13853
14078
|
this.isNavigate = false;
|
|
13854
14079
|
this.navigated = false;
|
|
14080
|
+
this.isBlur = false;
|
|
13855
14081
|
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
14082
|
this.isDeletion = false;
|
|
13857
14083
|
this.isShortYear = false;
|
|
@@ -13898,8 +14124,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13898
14124
|
this.parent.off('keyDownHandler', this.maskKeydownHandler);
|
|
13899
14125
|
this.parent.off('clearHandler', this.clearHandler);
|
|
13900
14126
|
};
|
|
13901
|
-
MaskedDateTime.prototype.createMask = function (
|
|
13902
|
-
if (navigated === void 0) { navigated = false; }
|
|
14127
|
+
MaskedDateTime.prototype.createMask = function (mask) {
|
|
13903
14128
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;
|
|
13904
14129
|
this.dateformat = this.getCulturedFormat();
|
|
13905
14130
|
if (this.parent.maskPlaceholder.day) {
|
|
@@ -13932,7 +14157,8 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13932
14157
|
this.mask = this.previousValue = inputValue;
|
|
13933
14158
|
this.parent.maskedDateValue = this.mask;
|
|
13934
14159
|
if (this.parent.value) {
|
|
13935
|
-
this.navigated =
|
|
14160
|
+
this.navigated = true;
|
|
14161
|
+
this.isBlur = mask.isBlur;
|
|
13936
14162
|
this.setDynamicValue();
|
|
13937
14163
|
}
|
|
13938
14164
|
};
|
|
@@ -13946,6 +14172,11 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13946
14172
|
};
|
|
13947
14173
|
MaskedDateTime.prototype.validCharacterCheck = function () {
|
|
13948
14174
|
var start = this.parent.inputElement.selectionStart;
|
|
14175
|
+
if (this.parent.moduleName !== 'timepicker') {
|
|
14176
|
+
if (start === this.hiddenMask.length && this.mask === this.parent.inputElement.value) {
|
|
14177
|
+
start = 0;
|
|
14178
|
+
}
|
|
14179
|
+
}
|
|
13949
14180
|
for (var i = start, j = start - 1; i < this.hiddenMask.length || j >= 0; i++, j--) {
|
|
13950
14181
|
if (i < this.hiddenMask.length && this.validCharacters.indexOf(this.hiddenMask[i]) !== -1) {
|
|
13951
14182
|
this.setSelection(this.hiddenMask[i]);
|
|
@@ -13961,7 +14192,9 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
13961
14192
|
this.maskDateValue = new Date(+this.parent.value);
|
|
13962
14193
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = true;
|
|
13963
14194
|
this.updateValue();
|
|
13964
|
-
this.
|
|
14195
|
+
if (!this.isBlur) {
|
|
14196
|
+
this.validCharacterCheck();
|
|
14197
|
+
}
|
|
13965
14198
|
};
|
|
13966
14199
|
MaskedDateTime.prototype.setSelection = function (validChar) {
|
|
13967
14200
|
var start = -1;
|
|
@@ -14474,7 +14707,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
|
|
|
14474
14707
|
MaskedDateTime.prototype.navigateSelection = function (isbackward) {
|
|
14475
14708
|
var start = this.parent.inputElement.selectionStart;
|
|
14476
14709
|
var end = this.parent.inputElement.selectionEnd;
|
|
14477
|
-
var formatIndex = isbackward ? start - 1 : end
|
|
14710
|
+
var formatIndex = isbackward ? start - 1 : end;
|
|
14478
14711
|
this.navigated = true;
|
|
14479
14712
|
while (formatIndex < this.hiddenMask.length && formatIndex >= 0) {
|
|
14480
14713
|
if (this.validCharacters.indexOf(this.hiddenMask[formatIndex]) >= 0) {
|