@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';
|
|
@@ -1507,7 +1507,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
1509
|
navigatePrevious(e) {
|
|
1510
|
-
e.preventDefault();
|
|
1510
|
+
!Browser.isDevice && e.preventDefault();
|
|
1511
1511
|
if (this.calendarMode === 'Gregorian') {
|
|
1512
1512
|
this.previous();
|
|
1513
1513
|
}
|
|
@@ -1538,7 +1538,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
}
|
|
1540
1540
|
navigateNext(eve) {
|
|
1541
|
-
eve.preventDefault();
|
|
1541
|
+
!Browser.isDevice && eve.preventDefault();
|
|
1542
1542
|
if (this.calendarMode === 'Gregorian') {
|
|
1543
1543
|
this.next();
|
|
1544
1544
|
}
|
|
@@ -3205,6 +3205,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3205
3205
|
this.isDynamicValueChanged = false;
|
|
3206
3206
|
this.moduleName = this.getModuleName();
|
|
3207
3207
|
this.isFocused = false;
|
|
3208
|
+
this.isBlur = false;
|
|
3208
3209
|
this.datepickerOptions = options;
|
|
3209
3210
|
}
|
|
3210
3211
|
/**
|
|
@@ -3216,7 +3217,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3216
3217
|
render() {
|
|
3217
3218
|
this.initialize();
|
|
3218
3219
|
this.bindEvents();
|
|
3219
|
-
|
|
3220
|
+
if (this.floatLabelType === 'Auto') {
|
|
3221
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
3222
|
+
}
|
|
3220
3223
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
3221
3224
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
3222
3225
|
}
|
|
@@ -3299,6 +3302,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3299
3302
|
this.l10n = new L10n('datepicker', l10nLocale, this.locale);
|
|
3300
3303
|
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
3301
3304
|
}
|
|
3305
|
+
if (this.fullScreenMode && Browser.isDevice) {
|
|
3306
|
+
this.cssClass = "e-popup-expand";
|
|
3307
|
+
}
|
|
3302
3308
|
let updatedCssClassValues = this.cssClass;
|
|
3303
3309
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
3304
3310
|
updatedCssClassValues = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
@@ -3337,10 +3343,10 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3337
3343
|
Input.addAttributes({ 'aria-label': 'select' }, this.inputWrapper.buttons[0]);
|
|
3338
3344
|
addClass([this.inputWrapper.container], DATEWRAPPER);
|
|
3339
3345
|
}
|
|
3340
|
-
updateInput(isDynamic = false) {
|
|
3346
|
+
updateInput(isDynamic = false, isBlur = false) {
|
|
3341
3347
|
let formatOptions;
|
|
3342
3348
|
if (this.value && !this.isCalendar()) {
|
|
3343
|
-
this.disabledDates(isDynamic);
|
|
3349
|
+
this.disabledDates(isDynamic, isBlur);
|
|
3344
3350
|
}
|
|
3345
3351
|
if (isNaN(+new Date(this.checkValue(this.value)))) {
|
|
3346
3352
|
this.setProperties({ value: null }, true);
|
|
@@ -3821,7 +3827,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3821
3827
|
this.invalidValueString = null;
|
|
3822
3828
|
this.updateInputValue('');
|
|
3823
3829
|
}
|
|
3824
|
-
this.
|
|
3830
|
+
this.isBlur = true;
|
|
3831
|
+
this.updateInput(false, true);
|
|
3832
|
+
this.isBlur = false;
|
|
3825
3833
|
this.popupUpdate();
|
|
3826
3834
|
this.changeTrigger(e);
|
|
3827
3835
|
if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {
|
|
@@ -4093,6 +4101,13 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4093
4101
|
zIndex: this.zIndex,
|
|
4094
4102
|
collision: Browser.isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },
|
|
4095
4103
|
open: () => {
|
|
4104
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
4105
|
+
this.iconRight = parseInt(window.getComputedStyle(this.calendarElement.querySelector('.e-header.e-month .e-prev')).marginRight, 10) > 16 ? true : false;
|
|
4106
|
+
this.touchModule = new Touch(this.calendarElement.querySelector(".e-content.e-month"), {
|
|
4107
|
+
swipe: this.CalendarSwipeHandler.bind(this)
|
|
4108
|
+
});
|
|
4109
|
+
EventHandler.add(this.calendarElement.querySelector(".e-content.e-month"), "touchstart", this.TouchStartHandler, this);
|
|
4110
|
+
}
|
|
4096
4111
|
if (this.getModuleName() !== 'datetimepicker') {
|
|
4097
4112
|
if (document.activeElement !== this.inputElement) {
|
|
4098
4113
|
this.defaultKeyConfigs = extend(this.defaultKeyConfigs, this.keyConfigs);
|
|
@@ -4134,6 +4149,45 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4134
4149
|
this.popupObj.element.className += ' ' + this.cssClass;
|
|
4135
4150
|
this.setAriaAttributes();
|
|
4136
4151
|
}
|
|
4152
|
+
CalendarSwipeHandler(e) {
|
|
4153
|
+
let direction = 0;
|
|
4154
|
+
if (this.iconRight) {
|
|
4155
|
+
switch (e.swipeDirection) {
|
|
4156
|
+
case "Left":
|
|
4157
|
+
direction = 1;
|
|
4158
|
+
break;
|
|
4159
|
+
case "Right":
|
|
4160
|
+
direction = -1;
|
|
4161
|
+
break;
|
|
4162
|
+
default:
|
|
4163
|
+
break;
|
|
4164
|
+
}
|
|
4165
|
+
}
|
|
4166
|
+
else {
|
|
4167
|
+
switch (e.swipeDirection) {
|
|
4168
|
+
case "Up":
|
|
4169
|
+
direction = 1;
|
|
4170
|
+
break;
|
|
4171
|
+
case "Down":
|
|
4172
|
+
direction = -1;
|
|
4173
|
+
break;
|
|
4174
|
+
default:
|
|
4175
|
+
break;
|
|
4176
|
+
}
|
|
4177
|
+
}
|
|
4178
|
+
if (this.touchStart) {
|
|
4179
|
+
if (direction === 1) {
|
|
4180
|
+
this.navigateNext(e);
|
|
4181
|
+
}
|
|
4182
|
+
else if (direction === -1) {
|
|
4183
|
+
this.navigatePrevious(e);
|
|
4184
|
+
}
|
|
4185
|
+
this.touchStart = false;
|
|
4186
|
+
}
|
|
4187
|
+
}
|
|
4188
|
+
TouchStartHandler(e) {
|
|
4189
|
+
this.touchStart = true;
|
|
4190
|
+
}
|
|
4137
4191
|
setAriaDisabled() {
|
|
4138
4192
|
if (!this.enabled) {
|
|
4139
4193
|
this.inputElement.setAttribute('aria-disabled', 'true');
|
|
@@ -4172,12 +4226,25 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4172
4226
|
dateOptions = { format: 'MMM d', skeleton: 'dateTime', calendar: 'islamic' };
|
|
4173
4227
|
}
|
|
4174
4228
|
monthSpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);
|
|
4175
|
-
|
|
4229
|
+
if (this.fullScreenMode) {
|
|
4230
|
+
const modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
4231
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelCloseHandler, this);
|
|
4232
|
+
const modelTodayButton = this.calendarElement.querySelector("button.e-today");
|
|
4233
|
+
h2.classList.add("e-day-wrapper");
|
|
4234
|
+
modelTodayButton.classList.add("e-outline");
|
|
4235
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
4236
|
+
modelHeader.appendChild(modelTodayButton);
|
|
4237
|
+
}
|
|
4238
|
+
if (!this.fullScreenMode)
|
|
4239
|
+
modelHeader.appendChild(yearHeading);
|
|
4176
4240
|
h2.appendChild(daySpan);
|
|
4177
4241
|
h2.appendChild(monthSpan);
|
|
4178
4242
|
modelHeader.appendChild(h2);
|
|
4179
4243
|
this.calendarElement.insertBefore(modelHeader, this.calendarElement.firstElementChild);
|
|
4180
4244
|
}
|
|
4245
|
+
modelCloseHandler(e) {
|
|
4246
|
+
this.hide();
|
|
4247
|
+
}
|
|
4181
4248
|
changeTrigger(event) {
|
|
4182
4249
|
if (this.inputElement.value !== this.previousElementValue) {
|
|
4183
4250
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -4204,7 +4271,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4204
4271
|
this.trigger('navigated', this.navigatedArgs);
|
|
4205
4272
|
}
|
|
4206
4273
|
changeEvent(event) {
|
|
4207
|
-
if (!this.isIconClicked) {
|
|
4274
|
+
if (!this.isIconClicked && !this.isBlur) {
|
|
4208
4275
|
this.selectCalendar(event);
|
|
4209
4276
|
}
|
|
4210
4277
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -4775,7 +4842,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4775
4842
|
getModuleName() {
|
|
4776
4843
|
return 'datepicker';
|
|
4777
4844
|
}
|
|
4778
|
-
disabledDates(isDynamic = false) {
|
|
4845
|
+
disabledDates(isDynamic = false, isBlur = false) {
|
|
4779
4846
|
let formatOptions;
|
|
4780
4847
|
let globalize;
|
|
4781
4848
|
const valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));
|
|
@@ -4830,7 +4897,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4830
4897
|
if (this.enableMask) {
|
|
4831
4898
|
this.updateInputValue(this.maskedDateValue);
|
|
4832
4899
|
this.notify('createMask', {
|
|
4833
|
-
module: 'MaskedDateTime'
|
|
4900
|
+
module: 'MaskedDateTime', isBlur: isBlur
|
|
4834
4901
|
});
|
|
4835
4902
|
}
|
|
4836
4903
|
}
|
|
@@ -5035,6 +5102,9 @@ __decorate$1([
|
|
|
5035
5102
|
__decorate$1([
|
|
5036
5103
|
Property(true)
|
|
5037
5104
|
], DatePicker.prototype, "enabled", void 0);
|
|
5105
|
+
__decorate$1([
|
|
5106
|
+
Property(false)
|
|
5107
|
+
], DatePicker.prototype, "fullScreenMode", void 0);
|
|
5038
5108
|
__decorate$1([
|
|
5039
5109
|
Property({})
|
|
5040
5110
|
], DatePicker.prototype, "htmlAttributes", void 0);
|
|
@@ -5246,7 +5316,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5246
5316
|
if (this.element.hasAttribute('data-val')) {
|
|
5247
5317
|
this.element.setAttribute('data-val', 'false');
|
|
5248
5318
|
}
|
|
5249
|
-
|
|
5319
|
+
if (this.floatLabelType === 'Auto') {
|
|
5320
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
5321
|
+
}
|
|
5250
5322
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
5251
5323
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
5252
5324
|
}
|
|
@@ -5286,7 +5358,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5286
5358
|
/**
|
|
5287
5359
|
* Mobile View
|
|
5288
5360
|
*/
|
|
5289
|
-
this.isMobile = window.matchMedia('(max-width:550px)').matches;
|
|
5361
|
+
this.isMobile = (Browser.isDevice && this.fullScreenMode) ? true : window.matchMedia('(max-width:550px)').matches;
|
|
5290
5362
|
this.inputElement = this.element;
|
|
5291
5363
|
this.angularTag = null;
|
|
5292
5364
|
if (this.element.tagName === 'EJS-DATERANGEPICKER') {
|
|
@@ -5618,7 +5690,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5618
5690
|
}
|
|
5619
5691
|
updateHiddenInput() {
|
|
5620
5692
|
if (this.firstHiddenChild && this.secondHiddenChild) {
|
|
5621
|
-
const format = { type: 'datetime', skeleton: 'yMd' };
|
|
5693
|
+
const format = { format: this.formatString, type: 'datetime', skeleton: 'yMd' };
|
|
5622
5694
|
if (typeof this.startDate === 'string') {
|
|
5623
5695
|
this.startDate = this.globalize.parseDate(this.startDate, format);
|
|
5624
5696
|
}
|
|
@@ -6027,7 +6099,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6027
6099
|
this.trigger('focus', focusArguments);
|
|
6028
6100
|
}
|
|
6029
6101
|
this.updateClearIconState();
|
|
6030
|
-
this.updateHiddenInput();
|
|
6031
6102
|
if (this.openOnFocus && !this.preventFocus) {
|
|
6032
6103
|
this.preventFocus = true;
|
|
6033
6104
|
this.show();
|
|
@@ -7743,6 +7814,16 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7743
7814
|
createControl() {
|
|
7744
7815
|
const controlContainer = this.createElement('div', { className: RANGECONTAINER });
|
|
7745
7816
|
const headerContainer = this.createElement('div', { className: RANGEHEADER });
|
|
7817
|
+
if (this.isMobile && this.fullScreenMode) {
|
|
7818
|
+
const modelHeaderIconWrapper = this.createElement("div", { className: "e-model-header-wrapper" });
|
|
7819
|
+
const modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
7820
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
7821
|
+
const modelApplyButton = this.createElement("span", { className: "e-apply" });
|
|
7822
|
+
EventHandler.add(modelApplyButton, 'mousedown touchstart', this.applyFunction, this);
|
|
7823
|
+
modelHeaderIconWrapper.appendChild(modelCloseIcon);
|
|
7824
|
+
modelHeaderIconWrapper.appendChild(modelApplyButton);
|
|
7825
|
+
headerContainer.appendChild(modelHeaderIconWrapper);
|
|
7826
|
+
}
|
|
7746
7827
|
const labelContainer = this.createRangeHeader();
|
|
7747
7828
|
headerContainer.appendChild(labelContainer);
|
|
7748
7829
|
const daySpan = this.createElement('div', { className: DAYSPAN });
|
|
@@ -7782,6 +7863,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7782
7863
|
}
|
|
7783
7864
|
this.renderPopup();
|
|
7784
7865
|
}
|
|
7866
|
+
modelRangeCloseHandler(e) {
|
|
7867
|
+
this.hide();
|
|
7868
|
+
}
|
|
7785
7869
|
cancelFunction(eve) {
|
|
7786
7870
|
if (document.activeElement !== this.inputElement) {
|
|
7787
7871
|
this.preventFocus = true;
|
|
@@ -7994,7 +8078,24 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7994
8078
|
this.liCollections = this.presetElement.querySelectorAll('.' + LISTCLASS);
|
|
7995
8079
|
this.wireListEvents();
|
|
7996
8080
|
if (this.isMobile) {
|
|
7997
|
-
|
|
8081
|
+
if (this.fullScreenMode) {
|
|
8082
|
+
const modelWrapper = createElement('div', { className: 'e-range-mob-popup-wrap' });
|
|
8083
|
+
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
8084
|
+
const modelTitleSpan = this.createElement("span", { className: "e-model-title" });
|
|
8085
|
+
modelTitleSpan.textContent = "Select Preset";
|
|
8086
|
+
const modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
8087
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
8088
|
+
const presetContent = this.presetElement;
|
|
8089
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
8090
|
+
modelHeader.appendChild(modelTitleSpan);
|
|
8091
|
+
modelWrapper.appendChild(modelHeader);
|
|
8092
|
+
modelWrapper.appendChild(presetContent);
|
|
8093
|
+
this.popupWrapper.insertBefore(modelWrapper, this.popupWrapper.firstElementChild);
|
|
8094
|
+
this.presetElement.style.width = '100%';
|
|
8095
|
+
}
|
|
8096
|
+
else {
|
|
8097
|
+
this.presetElement.style.width = this.inputWrapper.container.getBoundingClientRect().width + 'px';
|
|
8098
|
+
}
|
|
7998
8099
|
}
|
|
7999
8100
|
if (!isNullOrUndefined(this.activeIndex) && this.activeIndex > -1) {
|
|
8000
8101
|
addClass([this.liCollections[this.activeIndex]], ACTIVE$1);
|
|
@@ -8043,6 +8144,15 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8043
8144
|
enableRtl: this.enableRtl,
|
|
8044
8145
|
zIndex: this.zIndex,
|
|
8045
8146
|
open: () => {
|
|
8147
|
+
if (this.isMobile && this.fullScreenMode) {
|
|
8148
|
+
this.iconRangeRight = this.calendarElement && window.getComputedStyle(this.calendarElement.querySelector('.e-header.e-month .e-prev')).cssFloat;
|
|
8149
|
+
if (this.iconRangeRight) {
|
|
8150
|
+
this.touchRangeModule = new Touch(this.calendarElement.querySelector(".e-content.e-month"), {
|
|
8151
|
+
swipe: this.dateRangeSwipeHandler.bind(this)
|
|
8152
|
+
});
|
|
8153
|
+
EventHandler.add(this.calendarElement.querySelector(".e-content.e-month"), "touchstart", this.touchStartRangeHandler, this);
|
|
8154
|
+
}
|
|
8155
|
+
}
|
|
8046
8156
|
attributes(this.inputElement, { 'aria-expanded': 'true', 'aria-owns': this.inputElement.id + '_options' });
|
|
8047
8157
|
if (this.value) {
|
|
8048
8158
|
attributes(this.inputElement, { 'aria-activedescendant': this.inputElement.id });
|
|
@@ -8135,6 +8245,45 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8135
8245
|
}
|
|
8136
8246
|
EventHandler.add(document, 'mousedown touchstart', this.documentHandler, this);
|
|
8137
8247
|
}
|
|
8248
|
+
dateRangeSwipeHandler(e) {
|
|
8249
|
+
let direction = 0;
|
|
8250
|
+
if (this.iconRangeRight == 'left') {
|
|
8251
|
+
switch (e.swipeDirection) {
|
|
8252
|
+
case "Left":
|
|
8253
|
+
direction = 1;
|
|
8254
|
+
break;
|
|
8255
|
+
case "Right":
|
|
8256
|
+
direction = -1;
|
|
8257
|
+
break;
|
|
8258
|
+
default:
|
|
8259
|
+
break;
|
|
8260
|
+
}
|
|
8261
|
+
}
|
|
8262
|
+
else {
|
|
8263
|
+
switch (e.swipeDirection) {
|
|
8264
|
+
case "Up":
|
|
8265
|
+
direction = 1;
|
|
8266
|
+
break;
|
|
8267
|
+
case "Down":
|
|
8268
|
+
direction = -1;
|
|
8269
|
+
break;
|
|
8270
|
+
default:
|
|
8271
|
+
break;
|
|
8272
|
+
}
|
|
8273
|
+
}
|
|
8274
|
+
if (this.touchRangeStart) {
|
|
8275
|
+
if (direction === 1) {
|
|
8276
|
+
this.navigateNext(e);
|
|
8277
|
+
}
|
|
8278
|
+
else if (direction === -1) {
|
|
8279
|
+
this.navigatePrevious(e);
|
|
8280
|
+
}
|
|
8281
|
+
this.touchRangeStart = false;
|
|
8282
|
+
}
|
|
8283
|
+
}
|
|
8284
|
+
touchStartRangeHandler(e) {
|
|
8285
|
+
this.touchRangeStart = true;
|
|
8286
|
+
}
|
|
8138
8287
|
popupCloseHandler(e) {
|
|
8139
8288
|
switch (e.keyCode) {
|
|
8140
8289
|
case 27:
|
|
@@ -8386,6 +8535,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8386
8535
|
}
|
|
8387
8536
|
}
|
|
8388
8537
|
createInput() {
|
|
8538
|
+
if (this.fullScreenMode && this.isMobile) {
|
|
8539
|
+
this.cssClass = "e-popup-expand";
|
|
8540
|
+
}
|
|
8389
8541
|
let updatedCssClassValue = this.cssClass;
|
|
8390
8542
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
8391
8543
|
updatedCssClassValue = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
@@ -9475,6 +9627,9 @@ __decorate$2([
|
|
|
9475
9627
|
__decorate$2([
|
|
9476
9628
|
Property(false)
|
|
9477
9629
|
], DateRangePicker.prototype, "openOnFocus", void 0);
|
|
9630
|
+
__decorate$2([
|
|
9631
|
+
Property(false)
|
|
9632
|
+
], DateRangePicker.prototype, "fullScreenMode", void 0);
|
|
9478
9633
|
__decorate$2([
|
|
9479
9634
|
Event()
|
|
9480
9635
|
], DateRangePicker.prototype, "created", void 0);
|
|
@@ -9881,6 +10036,9 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9881
10036
|
return (!isNullOrUndefined(value) && value instanceof Date && !isNaN(+value)) ? value : null;
|
|
9882
10037
|
}
|
|
9883
10038
|
createInputElement() {
|
|
10039
|
+
if (this.fullScreenMode && Browser.isDevice) {
|
|
10040
|
+
this.cssClass = "e-popup-expand";
|
|
10041
|
+
}
|
|
9884
10042
|
let updatedCssClassesValue = this.cssClass;
|
|
9885
10043
|
const isBindClearAction = this.enableMask ? false : true;
|
|
9886
10044
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
@@ -10127,7 +10285,26 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10127
10285
|
if (!Browser.isDevice) {
|
|
10128
10286
|
this.popupObj.collision = { X: 'none', Y: 'flip' };
|
|
10129
10287
|
}
|
|
10130
|
-
this.
|
|
10288
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
10289
|
+
this.popupObj.element.style.maxHeight = "100%";
|
|
10290
|
+
this.popupObj.element.style.width = "100%";
|
|
10291
|
+
}
|
|
10292
|
+
else {
|
|
10293
|
+
this.popupObj.element.style.maxHeight = POPUPDIMENSION;
|
|
10294
|
+
}
|
|
10295
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
10296
|
+
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
10297
|
+
const modelTitleSpan = this.createElement("span", { className: "e-model-title" });
|
|
10298
|
+
modelTitleSpan.textContent = "Select time";
|
|
10299
|
+
const modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
10300
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.timePopupCloseHandler, this);
|
|
10301
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
10302
|
+
modelHeader.appendChild(modelTitleSpan);
|
|
10303
|
+
this.popupWrapper.insertBefore(modelHeader, this.popupWrapper.firstElementChild);
|
|
10304
|
+
}
|
|
10305
|
+
}
|
|
10306
|
+
timePopupCloseHandler(e) {
|
|
10307
|
+
this.hide();
|
|
10131
10308
|
}
|
|
10132
10309
|
//util function
|
|
10133
10310
|
getFormattedValue(value) {
|
|
@@ -10686,9 +10863,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10686
10863
|
if (this.isValidLI(li)) {
|
|
10687
10864
|
this.checkValue(li.getAttribute('data-value'));
|
|
10688
10865
|
if (this.enableMask) {
|
|
10689
|
-
this.
|
|
10690
|
-
module: 'MaskedDateTime', navigated: true
|
|
10691
|
-
});
|
|
10866
|
+
this.createMask();
|
|
10692
10867
|
}
|
|
10693
10868
|
this.selectedElement = li;
|
|
10694
10869
|
this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);
|
|
@@ -11369,7 +11544,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11369
11544
|
this.prevDate = this.valueWithMinutes = date;
|
|
11370
11545
|
if ((typeof date !== 'number') || (this.value && +new Date(+this.value).setMilliseconds(0)) !== +date) {
|
|
11371
11546
|
this.setProperties({ value: date }, true);
|
|
11372
|
-
if (this.enableMask) {
|
|
11547
|
+
if (this.enableMask && this.value) {
|
|
11373
11548
|
this.createMask();
|
|
11374
11549
|
}
|
|
11375
11550
|
}
|
|
@@ -12007,6 +12182,9 @@ __decorate$3([
|
|
|
12007
12182
|
__decorate$3([
|
|
12008
12183
|
Property(true)
|
|
12009
12184
|
], TimePicker.prototype, "enabled", void 0);
|
|
12185
|
+
__decorate$3([
|
|
12186
|
+
Property(false)
|
|
12187
|
+
], TimePicker.prototype, "fullScreenMode", void 0);
|
|
12010
12188
|
__decorate$3([
|
|
12011
12189
|
Property(false)
|
|
12012
12190
|
], TimePicker.prototype, "readonly", void 0);
|
|
@@ -12298,7 +12476,9 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12298
12476
|
this.inputElement.tabIndex = -1;
|
|
12299
12477
|
}
|
|
12300
12478
|
}
|
|
12301
|
-
|
|
12479
|
+
if (this.floatLabelType === 'Auto') {
|
|
12480
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
12481
|
+
}
|
|
12302
12482
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
12303
12483
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');
|
|
12304
12484
|
}
|
|
@@ -12618,7 +12798,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12618
12798
|
this.renderPopup();
|
|
12619
12799
|
this.setTimeScrollPosition();
|
|
12620
12800
|
this.openPopup(e);
|
|
12621
|
-
|
|
12801
|
+
if (!Browser.isDevice || (Browser.isDevice && !this.fullScreenMode)) {
|
|
12802
|
+
this.popupObject.refreshPosition(this.inputElement);
|
|
12803
|
+
}
|
|
12804
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
12805
|
+
this.dateTimeWrapper.style.left = '0px';
|
|
12806
|
+
}
|
|
12622
12807
|
}
|
|
12623
12808
|
}
|
|
12624
12809
|
}
|
|
@@ -12722,7 +12907,31 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12722
12907
|
}
|
|
12723
12908
|
}
|
|
12724
12909
|
});
|
|
12725
|
-
this.
|
|
12910
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
12911
|
+
this.popupObject.element.style.display = "flex";
|
|
12912
|
+
this.popupObject.element.style.maxHeight = "100%";
|
|
12913
|
+
this.popupObject.element.style.width = "100%";
|
|
12914
|
+
}
|
|
12915
|
+
else {
|
|
12916
|
+
this.popupObject.element.style.maxHeight = POPUPDIMENSION$1;
|
|
12917
|
+
}
|
|
12918
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
12919
|
+
const modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
|
|
12920
|
+
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
12921
|
+
const modelTitleSpan = this.createElement("span", { className: "e-model-title" });
|
|
12922
|
+
modelTitleSpan.textContent = "Select time";
|
|
12923
|
+
const modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
12924
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.dateTimeCloseHandler, this);
|
|
12925
|
+
const timeContent = this.dateTimeWrapper.querySelector(".e-content");
|
|
12926
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
12927
|
+
modelHeader.appendChild(modelTitleSpan);
|
|
12928
|
+
modelWrapper.appendChild(modelHeader);
|
|
12929
|
+
modelWrapper.appendChild(timeContent);
|
|
12930
|
+
this.dateTimeWrapper.insertBefore(modelWrapper, this.dateTimeWrapper.firstElementChild);
|
|
12931
|
+
}
|
|
12932
|
+
}
|
|
12933
|
+
dateTimeCloseHandler(e) {
|
|
12934
|
+
this.hide();
|
|
12726
12935
|
}
|
|
12727
12936
|
setDimension(width) {
|
|
12728
12937
|
if (typeof width === 'number') {
|
|
@@ -12778,7 +12987,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12778
12987
|
getPopupHeight() {
|
|
12779
12988
|
const height = parseInt(POPUPDIMENSION$1, 10);
|
|
12780
12989
|
const popupHeight = this.dateTimeWrapper.getBoundingClientRect().height;
|
|
12781
|
-
|
|
12990
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
12991
|
+
return popupHeight;
|
|
12992
|
+
}
|
|
12993
|
+
else {
|
|
12994
|
+
return popupHeight > height ? height : popupHeight;
|
|
12995
|
+
}
|
|
12782
12996
|
}
|
|
12783
12997
|
changeEvent(e) {
|
|
12784
12998
|
super.changeEvent(e);
|
|
@@ -12816,7 +13030,13 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12816
13030
|
const height = nextElement ? nextElement.offsetTop : element.offsetTop;
|
|
12817
13031
|
const lineHeight = element.getBoundingClientRect().height;
|
|
12818
13032
|
if ((height + element.offsetTop) > listHeight) {
|
|
12819
|
-
|
|
13033
|
+
if (Browser.isDevice && this.fullScreenMode) {
|
|
13034
|
+
const listContent = this.dateTimeWrapper.querySelector('.e-content');
|
|
13035
|
+
listContent.scrollTop = nextElement ? (height - (listHeight / HALFPOSITION$1 + lineHeight / HALFPOSITION$1)) : height;
|
|
13036
|
+
}
|
|
13037
|
+
else {
|
|
13038
|
+
this.dateTimeWrapper.scrollTop = nextElement ? (height - (listHeight / HALFPOSITION$1 + lineHeight / HALFPOSITION$1)) : height;
|
|
13039
|
+
}
|
|
12820
13040
|
}
|
|
12821
13041
|
else {
|
|
12822
13042
|
this.dateTimeWrapper.scrollTop = 0;
|
|
@@ -13602,6 +13822,9 @@ __decorate$4([
|
|
|
13602
13822
|
__decorate$4([
|
|
13603
13823
|
Property(false)
|
|
13604
13824
|
], DateTimePicker.prototype, "strictMode", void 0);
|
|
13825
|
+
__decorate$4([
|
|
13826
|
+
Property(false)
|
|
13827
|
+
], DateTimePicker.prototype, "fullScreenMode", void 0);
|
|
13605
13828
|
__decorate$4([
|
|
13606
13829
|
Property(null)
|
|
13607
13830
|
], DateTimePicker.prototype, "serverTimezoneOffset", void 0);
|
|
@@ -13705,6 +13928,7 @@ class MaskedDateTime {
|
|
|
13705
13928
|
this.isComplete = false;
|
|
13706
13929
|
this.isNavigate = false;
|
|
13707
13930
|
this.navigated = false;
|
|
13931
|
+
this.isBlur = false;
|
|
13708
13932
|
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;
|
|
13709
13933
|
this.isDeletion = false;
|
|
13710
13934
|
this.isShortYear = false;
|
|
@@ -13751,7 +13975,7 @@ class MaskedDateTime {
|
|
|
13751
13975
|
this.parent.off('keyDownHandler', this.maskKeydownHandler);
|
|
13752
13976
|
this.parent.off('clearHandler', this.clearHandler);
|
|
13753
13977
|
}
|
|
13754
|
-
createMask(
|
|
13978
|
+
createMask(mask) {
|
|
13755
13979
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;
|
|
13756
13980
|
this.dateformat = this.getCulturedFormat();
|
|
13757
13981
|
if (this.parent.maskPlaceholder.day) {
|
|
@@ -13784,7 +14008,8 @@ class MaskedDateTime {
|
|
|
13784
14008
|
this.mask = this.previousValue = inputValue;
|
|
13785
14009
|
this.parent.maskedDateValue = this.mask;
|
|
13786
14010
|
if (this.parent.value) {
|
|
13787
|
-
this.navigated =
|
|
14011
|
+
this.navigated = true;
|
|
14012
|
+
this.isBlur = mask.isBlur;
|
|
13788
14013
|
this.setDynamicValue();
|
|
13789
14014
|
}
|
|
13790
14015
|
}
|
|
@@ -13797,7 +14022,12 @@ class MaskedDateTime {
|
|
|
13797
14022
|
}
|
|
13798
14023
|
}
|
|
13799
14024
|
validCharacterCheck() {
|
|
13800
|
-
|
|
14025
|
+
let start = this.parent.inputElement.selectionStart;
|
|
14026
|
+
if (this.parent.moduleName !== 'timepicker') {
|
|
14027
|
+
if (start === this.hiddenMask.length && this.mask === this.parent.inputElement.value) {
|
|
14028
|
+
start = 0;
|
|
14029
|
+
}
|
|
14030
|
+
}
|
|
13801
14031
|
for (let i = start, j = start - 1; i < this.hiddenMask.length || j >= 0; i++, j--) {
|
|
13802
14032
|
if (i < this.hiddenMask.length && this.validCharacters.indexOf(this.hiddenMask[i]) !== -1) {
|
|
13803
14033
|
this.setSelection(this.hiddenMask[i]);
|
|
@@ -13813,7 +14043,9 @@ class MaskedDateTime {
|
|
|
13813
14043
|
this.maskDateValue = new Date(+this.parent.value);
|
|
13814
14044
|
this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = true;
|
|
13815
14045
|
this.updateValue();
|
|
13816
|
-
this.
|
|
14046
|
+
if (!this.isBlur) {
|
|
14047
|
+
this.validCharacterCheck();
|
|
14048
|
+
}
|
|
13817
14049
|
}
|
|
13818
14050
|
setSelection(validChar) {
|
|
13819
14051
|
let start = -1;
|
|
@@ -14325,7 +14557,7 @@ class MaskedDateTime {
|
|
|
14325
14557
|
navigateSelection(isbackward) {
|
|
14326
14558
|
const start = this.parent.inputElement.selectionStart;
|
|
14327
14559
|
const end = this.parent.inputElement.selectionEnd;
|
|
14328
|
-
let formatIndex = isbackward ? start - 1 : end
|
|
14560
|
+
let formatIndex = isbackward ? start - 1 : end;
|
|
14329
14561
|
this.navigated = true;
|
|
14330
14562
|
while (formatIndex < this.hiddenMask.length && formatIndex >= 0) {
|
|
14331
14563
|
if (this.validCharacters.indexOf(this.hiddenMask[formatIndex]) >= 0) {
|