@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 22.1.34
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-calendars@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-calendars@
|
|
3
|
+
"_id": "@syncfusion/ej2-calendars@18.30.17",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-SnX9BTY2Swgg/KkCKCkXT2ceYIuvP7eWTB6qkKufoQODUbpGQ1FCQ39RddN5bgUgTHR7mmOR/Zr0qFONHkAFWQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-calendars",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"/@syncfusion/ej2-schedule",
|
|
33
33
|
"/@syncfusion/ej2-vue-calendars"
|
|
34
34
|
],
|
|
35
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
36
|
-
"_shasum": "
|
|
35
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-calendars/-/ej2-calendars-18.30.17.tgz",
|
|
36
|
+
"_shasum": "bd1deeac1a021cf0417ca1a889cb9a2f4f485ec9",
|
|
37
37
|
"_spec": "@syncfusion/ej2-calendars@*",
|
|
38
38
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
39
39
|
"author": {
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
},
|
|
45
45
|
"bundleDependencies": false,
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@syncfusion/ej2-base": "~
|
|
48
|
-
"@syncfusion/ej2-buttons": "~
|
|
49
|
-
"@syncfusion/ej2-inputs": "~
|
|
50
|
-
"@syncfusion/ej2-lists": "~
|
|
51
|
-
"@syncfusion/ej2-popups": "~
|
|
47
|
+
"@syncfusion/ej2-base": "~22.1.34",
|
|
48
|
+
"@syncfusion/ej2-buttons": "~22.1.34",
|
|
49
|
+
"@syncfusion/ej2-inputs": "~22.1.34",
|
|
50
|
+
"@syncfusion/ej2-lists": "~22.1.34",
|
|
51
|
+
"@syncfusion/ej2-popups": "~22.1.34"
|
|
52
52
|
},
|
|
53
53
|
"deprecated": false,
|
|
54
54
|
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
82
82
|
},
|
|
83
83
|
"typings": "index.d.ts",
|
|
84
|
-
"version": "
|
|
84
|
+
"version": "22.1.34",
|
|
85
85
|
"sideEffects": false
|
|
86
86
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, EventHandler, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, KeyboardEventArgs, BaseEventArgs } from '@syncfusion/ej2-base';import { cldrData, getDefaultDateObject, rippleEffect } from '@syncfusion/ej2-base';import { removeClass, detach, closest, addClass, attributes } from '@syncfusion/ej2-base';import { getValue, getUniqueID, extend, Browser } from '@syncfusion/ej2-base';import { Property, Event, EmitType, isNullOrUndefined, throwError } from '@syncfusion/ej2-base';import { Islamic, IslamicDateArgs } from './index';
|
|
1
|
+
import { Component, EventHandler, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, KeyboardEvents, L10n, SwipeEventArgs } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, KeyboardEventArgs, BaseEventArgs } from '@syncfusion/ej2-base';import { cldrData, getDefaultDateObject, rippleEffect } from '@syncfusion/ej2-base';import { removeClass, detach, closest, addClass, attributes } from '@syncfusion/ej2-base';import { getValue, getUniqueID, extend, Browser } from '@syncfusion/ej2-base';import { Property, Event, EmitType, isNullOrUndefined, throwError } from '@syncfusion/ej2-base';import { Islamic, IslamicDateArgs } from './index';
|
|
2
2
|
import {CalendarType,CalendarView,WeekRule,DayHeaderFormats,NavigatedEventArgs,RenderDayCellEventArgs,ChangedEventArgs} from "./calendar";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';
|
|
2
|
-
import { INotifyPropertyChanged, KeyboardEvents, L10n } from '@syncfusion/ej2-base';
|
|
2
|
+
import { INotifyPropertyChanged, KeyboardEvents, L10n, SwipeEventArgs } from '@syncfusion/ej2-base';
|
|
3
3
|
import { KeyboardEventArgs, BaseEventArgs } from '@syncfusion/ej2-base';
|
|
4
4
|
import { EmitType } from '@syncfusion/ej2-base';
|
|
5
5
|
import { CalendarModel, CalendarBaseModel } from './calendar-model';
|
|
@@ -456,9 +456,9 @@ export declare class CalendarBase extends Component<HTMLElement> implements INot
|
|
|
456
456
|
protected getViewNumber(stringVal: string): number;
|
|
457
457
|
protected navigateTitle(e?: Event): void;
|
|
458
458
|
protected previous(): void;
|
|
459
|
-
protected navigatePrevious(e: MouseEvent | KeyboardEvent): void;
|
|
459
|
+
protected navigatePrevious(e: MouseEvent | KeyboardEvent | SwipeEventArgs): void;
|
|
460
460
|
protected next(): void;
|
|
461
|
-
protected navigateNext(eve: MouseEvent | KeyboardEvent): void;
|
|
461
|
+
protected navigateNext(eve: MouseEvent | KeyboardEvent | SwipeEventArgs): void;
|
|
462
462
|
/**
|
|
463
463
|
* This method is used to navigate to the month/year/decade view of the Calendar.
|
|
464
464
|
*
|
|
@@ -487,8 +487,8 @@ export declare class CalendarBase extends Component<HTMLElement> implements INot
|
|
|
487
487
|
protected setAriaActiveDescendant(): void;
|
|
488
488
|
protected previousIconHandler(disabled: boolean): void;
|
|
489
489
|
protected renderDayCellEvent(args: RenderDayCellEventArgs): void;
|
|
490
|
-
protected navigatedEvent(eve: MouseEvent | KeyboardEvent): void;
|
|
491
|
-
protected triggerNavigate(event: MouseEvent | KeyboardEvent): void;
|
|
490
|
+
protected navigatedEvent(eve: MouseEvent | KeyboardEvent | SwipeEventArgs): void;
|
|
491
|
+
protected triggerNavigate(event: MouseEvent | KeyboardEvent | SwipeEventArgs): void;
|
|
492
492
|
protected nextIconHandler(disabled: boolean): void;
|
|
493
493
|
protected compare(startDate: Date, endDate: Date, modifier: number): number;
|
|
494
494
|
protected isMinMaxRange(date: Date): boolean;
|
package/src/calendar/calendar.js
CHANGED
|
@@ -1526,7 +1526,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
};
|
|
1528
1528
|
CalendarBase.prototype.navigatePrevious = function (e) {
|
|
1529
|
-
e.preventDefault();
|
|
1529
|
+
!Browser.isDevice && e.preventDefault();
|
|
1530
1530
|
if (this.calendarMode === 'Gregorian') {
|
|
1531
1531
|
this.previous();
|
|
1532
1532
|
}
|
|
@@ -1557,7 +1557,7 @@ var CalendarBase = /** @class */ (function (_super) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
};
|
|
1559
1559
|
CalendarBase.prototype.navigateNext = function (eve) {
|
|
1560
|
-
eve.preventDefault();
|
|
1560
|
+
!Browser.isDevice && eve.preventDefault();
|
|
1561
1561
|
if (this.calendarMode === 'Gregorian') {
|
|
1562
1562
|
this.next();
|
|
1563
1563
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventHandler, Property, Internationalization, NotifyPropertyChanges, DateFormatOptions } from '@syncfusion/ej2-base';import { KeyboardEvents, KeyboardEventArgs, Animation, EmitType, Event, extend, L10n, Browser, formatUnit } from '@syncfusion/ej2-base';import { detach, addClass, removeClass, closest, attributes } from '@syncfusion/ej2-base';import { isNullOrUndefined, setValue, getUniqueID, ModuleDeclaration } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { Input, InputObject, IInput, FloatLabelType } from '@syncfusion/ej2-inputs';import { ChangedEventArgs, CalendarView, Calendar, BlurEventArgs, FocusEventArgs, ClearedEventArgs } from '../calendar/calendar';import { MaskPlaceholderModel } from '../common/maskplaceholder-model';
|
|
1
|
+
import { EventHandler, Property, Internationalization, NotifyPropertyChanges, DateFormatOptions } from '@syncfusion/ej2-base';import { KeyboardEvents, KeyboardEventArgs, Animation, EmitType, Event, extend, L10n, Browser, formatUnit } from '@syncfusion/ej2-base';import { detach, addClass, removeClass, closest, attributes, Touch, SwipeEventArgs } from '@syncfusion/ej2-base';import { isNullOrUndefined, setValue, getUniqueID, ModuleDeclaration } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { Input, InputObject, IInput, FloatLabelType } from '@syncfusion/ej2-inputs';import { ChangedEventArgs, CalendarView, Calendar, BlurEventArgs, FocusEventArgs, ClearedEventArgs } from '../calendar/calendar';import { MaskPlaceholderModel } from '../common/maskplaceholder-model';
|
|
2
2
|
import {FormatObject,PopupObjectArgs,PreventableEventArgs} from "./datepicker";
|
|
3
3
|
import {CalendarModel} from "../calendar/calendar-model";
|
|
4
4
|
|
|
@@ -60,6 +60,13 @@ export interface DatePickerModel extends CalendarModel{
|
|
|
60
60
|
*/
|
|
61
61
|
enabled?: boolean;
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Specifies the component popup display full screen in mobile devices.
|
|
65
|
+
*
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
fullScreenMode?: boolean;
|
|
69
|
+
|
|
63
70
|
/**
|
|
64
71
|
* You can add the additional html attributes such as disabled, value etc., to the element.
|
|
65
72
|
* If you configured both property and equivalent html attribute then the component considers the property value.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference path="../calendar/calendar-model.d.ts" />
|
|
2
2
|
import { KeyboardEventArgs, EmitType, L10n } from '@syncfusion/ej2-base';
|
|
3
|
+
import { Touch } from '@syncfusion/ej2-base';
|
|
3
4
|
import { ModuleDeclaration } from '@syncfusion/ej2-base';
|
|
4
5
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
5
6
|
import { InputObject, IInput, FloatLabelType } from '@syncfusion/ej2-inputs';
|
|
@@ -63,6 +64,10 @@ export declare class DatePicker extends Calendar implements IInput {
|
|
|
63
64
|
protected isDynamicValueChanged: boolean;
|
|
64
65
|
protected moduleName: string;
|
|
65
66
|
protected isFocused: boolean;
|
|
67
|
+
protected touchModule: Touch;
|
|
68
|
+
protected touchStart: boolean;
|
|
69
|
+
protected iconRight: boolean;
|
|
70
|
+
protected isBlur: boolean;
|
|
66
71
|
/**
|
|
67
72
|
* Specifies the width of the DatePicker component.
|
|
68
73
|
*
|
|
@@ -110,6 +115,12 @@ export declare class DatePicker extends Calendar implements IInput {
|
|
|
110
115
|
* @default true
|
|
111
116
|
*/
|
|
112
117
|
enabled: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Specifies the component popup display full screen in mobile devices.
|
|
120
|
+
*
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
fullScreenMode: boolean;
|
|
113
124
|
/**
|
|
114
125
|
* You can add the additional html attributes such as disabled, value etc., to the element.
|
|
115
126
|
* If you configured both property and equivalent html attribute then the component considers the property value.
|
|
@@ -399,7 +410,7 @@ export declare class DatePicker extends Calendar implements IInput {
|
|
|
399
410
|
protected updateIconState(): void;
|
|
400
411
|
private initialize;
|
|
401
412
|
private createInput;
|
|
402
|
-
protected updateInput(isDynamic?: boolean): void;
|
|
413
|
+
protected updateInput(isDynamic?: boolean, isBlur?: boolean): void;
|
|
403
414
|
protected minMaxUpdates(): void;
|
|
404
415
|
private checkStringValue;
|
|
405
416
|
protected checkInvalidValue(value: Date): void;
|
|
@@ -430,8 +441,11 @@ export declare class DatePicker extends Calendar implements IInput {
|
|
|
430
441
|
protected popupUpdate(): void;
|
|
431
442
|
protected strictModeUpdate(): void;
|
|
432
443
|
private createCalendar;
|
|
444
|
+
private CalendarSwipeHandler;
|
|
445
|
+
private TouchStartHandler;
|
|
433
446
|
private setAriaDisabled;
|
|
434
447
|
private modelHeader;
|
|
448
|
+
private modelCloseHandler;
|
|
435
449
|
protected changeTrigger(event?: MouseEvent | KeyboardEvent): void;
|
|
436
450
|
protected navigatedEvent(): void;
|
|
437
451
|
protected changeEvent(event?: MouseEvent | KeyboardEvent | Event): void;
|
|
@@ -21,7 +21,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
21
21
|
/// <reference path='../calendar/calendar-model.d.ts'/>
|
|
22
22
|
import { EventHandler, Property, Internationalization, NotifyPropertyChanges } from '@syncfusion/ej2-base';
|
|
23
23
|
import { KeyboardEvents, Animation, Event, extend, L10n, Browser, formatUnit } from '@syncfusion/ej2-base';
|
|
24
|
-
import { detach, addClass, removeClass, closest, attributes } from '@syncfusion/ej2-base';
|
|
24
|
+
import { detach, addClass, removeClass, closest, attributes, Touch } from '@syncfusion/ej2-base';
|
|
25
25
|
import { isNullOrUndefined, setValue, getUniqueID } from '@syncfusion/ej2-base';
|
|
26
26
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
27
27
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
@@ -85,6 +85,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
85
85
|
_this.isDynamicValueChanged = false;
|
|
86
86
|
_this.moduleName = _this.getModuleName();
|
|
87
87
|
_this.isFocused = false;
|
|
88
|
+
_this.isBlur = false;
|
|
88
89
|
_this.datepickerOptions = options;
|
|
89
90
|
return _this;
|
|
90
91
|
}
|
|
@@ -97,7 +98,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
97
98
|
DatePicker.prototype.render = function () {
|
|
98
99
|
this.initialize();
|
|
99
100
|
this.bindEvents();
|
|
100
|
-
|
|
101
|
+
if (this.floatLabelType === 'Auto') {
|
|
102
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
103
|
+
}
|
|
101
104
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
102
105
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
103
106
|
}
|
|
@@ -180,6 +183,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
180
183
|
this.l10n = new L10n('datepicker', l10nLocale, this.locale);
|
|
181
184
|
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
182
185
|
}
|
|
186
|
+
if (this.fullScreenMode && Browser.isDevice) {
|
|
187
|
+
this.cssClass = "e-popup-expand";
|
|
188
|
+
}
|
|
183
189
|
var updatedCssClassValues = this.cssClass;
|
|
184
190
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
185
191
|
updatedCssClassValues = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
@@ -218,11 +224,12 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
218
224
|
Input.addAttributes({ 'aria-label': 'select' }, this.inputWrapper.buttons[0]);
|
|
219
225
|
addClass([this.inputWrapper.container], DATEWRAPPER);
|
|
220
226
|
};
|
|
221
|
-
DatePicker.prototype.updateInput = function (isDynamic) {
|
|
227
|
+
DatePicker.prototype.updateInput = function (isDynamic, isBlur) {
|
|
222
228
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
229
|
+
if (isBlur === void 0) { isBlur = false; }
|
|
223
230
|
var formatOptions;
|
|
224
231
|
if (this.value && !this.isCalendar()) {
|
|
225
|
-
this.disabledDates(isDynamic);
|
|
232
|
+
this.disabledDates(isDynamic, isBlur);
|
|
226
233
|
}
|
|
227
234
|
if (isNaN(+new Date(this.checkValue(this.value)))) {
|
|
228
235
|
this.setProperties({ value: null }, true);
|
|
@@ -705,7 +712,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
705
712
|
this.invalidValueString = null;
|
|
706
713
|
this.updateInputValue('');
|
|
707
714
|
}
|
|
708
|
-
this.
|
|
715
|
+
this.isBlur = true;
|
|
716
|
+
this.updateInput(false, true);
|
|
717
|
+
this.isBlur = false;
|
|
709
718
|
this.popupUpdate();
|
|
710
719
|
this.changeTrigger(e);
|
|
711
720
|
if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {
|
|
@@ -978,6 +987,13 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
978
987
|
zIndex: this.zIndex,
|
|
979
988
|
collision: Browser.isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },
|
|
980
989
|
open: function () {
|
|
990
|
+
if (Browser.isDevice && _this.fullScreenMode) {
|
|
991
|
+
_this.iconRight = parseInt(window.getComputedStyle(_this.calendarElement.querySelector('.e-header.e-month .e-prev')).marginRight, 10) > 16 ? true : false;
|
|
992
|
+
_this.touchModule = new Touch(_this.calendarElement.querySelector(".e-content.e-month"), {
|
|
993
|
+
swipe: _this.CalendarSwipeHandler.bind(_this)
|
|
994
|
+
});
|
|
995
|
+
EventHandler.add(_this.calendarElement.querySelector(".e-content.e-month"), "touchstart", _this.TouchStartHandler, _this);
|
|
996
|
+
}
|
|
981
997
|
if (_this.getModuleName() !== 'datetimepicker') {
|
|
982
998
|
if (document.activeElement !== _this.inputElement) {
|
|
983
999
|
_this.defaultKeyConfigs = extend(_this.defaultKeyConfigs, _this.keyConfigs);
|
|
@@ -1019,6 +1035,45 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1019
1035
|
this.popupObj.element.className += ' ' + this.cssClass;
|
|
1020
1036
|
this.setAriaAttributes();
|
|
1021
1037
|
};
|
|
1038
|
+
DatePicker.prototype.CalendarSwipeHandler = function (e) {
|
|
1039
|
+
var direction = 0;
|
|
1040
|
+
if (this.iconRight) {
|
|
1041
|
+
switch (e.swipeDirection) {
|
|
1042
|
+
case "Left":
|
|
1043
|
+
direction = 1;
|
|
1044
|
+
break;
|
|
1045
|
+
case "Right":
|
|
1046
|
+
direction = -1;
|
|
1047
|
+
break;
|
|
1048
|
+
default:
|
|
1049
|
+
break;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
else {
|
|
1053
|
+
switch (e.swipeDirection) {
|
|
1054
|
+
case "Up":
|
|
1055
|
+
direction = 1;
|
|
1056
|
+
break;
|
|
1057
|
+
case "Down":
|
|
1058
|
+
direction = -1;
|
|
1059
|
+
break;
|
|
1060
|
+
default:
|
|
1061
|
+
break;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
if (this.touchStart) {
|
|
1065
|
+
if (direction === 1) {
|
|
1066
|
+
this.navigateNext(e);
|
|
1067
|
+
}
|
|
1068
|
+
else if (direction === -1) {
|
|
1069
|
+
this.navigatePrevious(e);
|
|
1070
|
+
}
|
|
1071
|
+
this.touchStart = false;
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
DatePicker.prototype.TouchStartHandler = function (e) {
|
|
1075
|
+
this.touchStart = true;
|
|
1076
|
+
};
|
|
1022
1077
|
DatePicker.prototype.setAriaDisabled = function () {
|
|
1023
1078
|
if (!this.enabled) {
|
|
1024
1079
|
this.inputElement.setAttribute('aria-disabled', 'true');
|
|
@@ -1057,12 +1112,25 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1057
1112
|
dateOptions = { format: 'MMM d', skeleton: 'dateTime', calendar: 'islamic' };
|
|
1058
1113
|
}
|
|
1059
1114
|
monthSpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);
|
|
1060
|
-
|
|
1115
|
+
if (this.fullScreenMode) {
|
|
1116
|
+
var modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
1117
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelCloseHandler, this);
|
|
1118
|
+
var modelTodayButton = this.calendarElement.querySelector("button.e-today");
|
|
1119
|
+
h2.classList.add("e-day-wrapper");
|
|
1120
|
+
modelTodayButton.classList.add("e-outline");
|
|
1121
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
1122
|
+
modelHeader.appendChild(modelTodayButton);
|
|
1123
|
+
}
|
|
1124
|
+
if (!this.fullScreenMode)
|
|
1125
|
+
modelHeader.appendChild(yearHeading);
|
|
1061
1126
|
h2.appendChild(daySpan);
|
|
1062
1127
|
h2.appendChild(monthSpan);
|
|
1063
1128
|
modelHeader.appendChild(h2);
|
|
1064
1129
|
this.calendarElement.insertBefore(modelHeader, this.calendarElement.firstElementChild);
|
|
1065
1130
|
};
|
|
1131
|
+
DatePicker.prototype.modelCloseHandler = function (e) {
|
|
1132
|
+
this.hide();
|
|
1133
|
+
};
|
|
1066
1134
|
DatePicker.prototype.changeTrigger = function (event) {
|
|
1067
1135
|
if (this.inputElement.value !== this.previousElementValue) {
|
|
1068
1136
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -1089,7 +1157,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1089
1157
|
this.trigger('navigated', this.navigatedArgs);
|
|
1090
1158
|
};
|
|
1091
1159
|
DatePicker.prototype.changeEvent = function (event) {
|
|
1092
|
-
if (!this.isIconClicked) {
|
|
1160
|
+
if (!this.isIconClicked && !this.isBlur) {
|
|
1093
1161
|
this.selectCalendar(event);
|
|
1094
1162
|
}
|
|
1095
1163
|
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
@@ -1663,8 +1731,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1663
1731
|
DatePicker.prototype.getModuleName = function () {
|
|
1664
1732
|
return 'datepicker';
|
|
1665
1733
|
};
|
|
1666
|
-
DatePicker.prototype.disabledDates = function (isDynamic) {
|
|
1734
|
+
DatePicker.prototype.disabledDates = function (isDynamic, isBlur) {
|
|
1667
1735
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
1736
|
+
if (isBlur === void 0) { isBlur = false; }
|
|
1668
1737
|
var formatOptions;
|
|
1669
1738
|
var globalize;
|
|
1670
1739
|
var valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));
|
|
@@ -1719,7 +1788,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1719
1788
|
if (this.enableMask) {
|
|
1720
1789
|
this.updateInputValue(this.maskedDateValue);
|
|
1721
1790
|
this.notify('createMask', {
|
|
1722
|
-
module: 'MaskedDateTime'
|
|
1791
|
+
module: 'MaskedDateTime', isBlur: isBlur
|
|
1723
1792
|
});
|
|
1724
1793
|
}
|
|
1725
1794
|
}
|
|
@@ -1924,6 +1993,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1924
1993
|
__decorate([
|
|
1925
1994
|
Property(true)
|
|
1926
1995
|
], DatePicker.prototype, "enabled", void 0);
|
|
1996
|
+
__decorate([
|
|
1997
|
+
Property(false)
|
|
1998
|
+
], DatePicker.prototype, "fullScreenMode", void 0);
|
|
1927
1999
|
__decorate([
|
|
1928
2000
|
Property({})
|
|
1929
2001
|
], DatePicker.prototype, "htmlAttributes", void 0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Property, EventHandler, Internationalization, NotifyPropertyChanges, detach, getUniqueID } from '@syncfusion/ej2-base';import { KeyboardEvents, BaseEventArgs, KeyboardEventArgs, Event, EmitType, Browser, L10n, ChildProperty } from '@syncfusion/ej2-base';import { addClass, createElement, remove, closest, select, prepend, removeClass, attributes, Collection } from '@syncfusion/ej2-base';import { isNullOrUndefined, isUndefined, formatUnit, setValue, rippleEffect, merge, extend } from '@syncfusion/ej2-base';import { CalendarView, CalendarBase, NavigatedEventArgs, RenderDayCellEventArgs, CalendarType } from '../calendar/calendar';import { Popup } from '@syncfusion/ej2-popups';import { Button } from '@syncfusion/ej2-buttons';import { BlurEventArgs, FocusEventArgs, ClearedEventArgs } from '../calendar/calendar';import { Input, InputObject, FloatLabelType } from '@syncfusion/ej2-inputs';import { ListBase} from '@syncfusion/ej2-lists';
|
|
1
|
+
import { Property, EventHandler, Internationalization, NotifyPropertyChanges, detach, getUniqueID } from '@syncfusion/ej2-base';import { KeyboardEvents, BaseEventArgs, KeyboardEventArgs, Event, EmitType, Browser, L10n, ChildProperty } from '@syncfusion/ej2-base';import { addClass, createElement, remove, closest, select, prepend, removeClass, attributes, Collection } from '@syncfusion/ej2-base';import { isNullOrUndefined, isUndefined, formatUnit, setValue, rippleEffect, merge, extend, Touch, SwipeEventArgs } from '@syncfusion/ej2-base';import { CalendarView, CalendarBase, NavigatedEventArgs, RenderDayCellEventArgs, CalendarType } from '../calendar/calendar';import { Popup } from '@syncfusion/ej2-popups';import { Button } from '@syncfusion/ej2-buttons';import { BlurEventArgs, FocusEventArgs, ClearedEventArgs } from '../calendar/calendar';import { Input, InputObject, FloatLabelType } from '@syncfusion/ej2-inputs';import { ListBase} from '@syncfusion/ej2-lists';
|
|
2
2
|
import {DateRange,RangeEventArgs,RangeFormatObject} from "./daterangepicker";
|
|
3
3
|
import {CalendarBaseModel} from "../calendar/calendar-model";
|
|
4
4
|
|
|
@@ -103,6 +103,13 @@ export interface DateRangePickerModel extends CalendarBaseModel{
|
|
|
103
103
|
*/
|
|
104
104
|
openOnFocus?: boolean;
|
|
105
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Specifies the component popup display full screen in mobile devices.
|
|
108
|
+
*
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
fullScreenMode?: boolean;
|
|
112
|
+
|
|
106
113
|
/**
|
|
107
114
|
* Triggers when Calendar is created.
|
|
108
115
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference path="../calendar/calendar-model.d.ts" />
|
|
2
2
|
import { KeyboardEvents, BaseEventArgs, KeyboardEventArgs, EmitType, ChildProperty } from '@syncfusion/ej2-base';
|
|
3
|
+
import { Touch } from '@syncfusion/ej2-base';
|
|
3
4
|
import { CalendarView, CalendarBase, NavigatedEventArgs, RenderDayCellEventArgs, CalendarType } from '../calendar/calendar';
|
|
4
5
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
5
6
|
import { BlurEventArgs, FocusEventArgs, ClearedEventArgs } from '../calendar/calendar';
|
|
@@ -169,6 +170,9 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
169
170
|
private mobileRangePopupWrap;
|
|
170
171
|
protected isAngular: boolean;
|
|
171
172
|
protected preventChange: boolean;
|
|
173
|
+
protected touchRangeModule: Touch;
|
|
174
|
+
protected touchRangeStart: boolean;
|
|
175
|
+
protected iconRangeRight: string;
|
|
172
176
|
/**
|
|
173
177
|
* Gets or sets the start and end date of the Calendar.
|
|
174
178
|
* {% codeBlock src='daterangepicker/value/index.md' %}{% endcodeBlock %}
|
|
@@ -234,6 +238,12 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
234
238
|
* @default false
|
|
235
239
|
*/
|
|
236
240
|
openOnFocus: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Specifies the component popup display full screen in mobile devices.
|
|
243
|
+
*
|
|
244
|
+
* @default false
|
|
245
|
+
*/
|
|
246
|
+
fullScreenMode: boolean;
|
|
237
247
|
/**
|
|
238
248
|
* Triggers when Calendar is created.
|
|
239
249
|
*
|
|
@@ -702,6 +712,7 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
702
712
|
protected getCalendarView(view: string): CalendarView;
|
|
703
713
|
protected navigatedEvent(e: MouseEvent): void;
|
|
704
714
|
private createControl;
|
|
715
|
+
private modelRangeCloseHandler;
|
|
705
716
|
private cancelFunction;
|
|
706
717
|
private deviceHeaderUpdate;
|
|
707
718
|
private applyFunction;
|
|
@@ -719,6 +730,8 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
719
730
|
private wireListEvents;
|
|
720
731
|
private unWireListEvents;
|
|
721
732
|
private renderPopup;
|
|
733
|
+
private dateRangeSwipeHandler;
|
|
734
|
+
private touchStartRangeHandler;
|
|
722
735
|
protected popupCloseHandler(e: KeyboardEventArgs): void;
|
|
723
736
|
private calendarFocus;
|
|
724
737
|
private presetHeight;
|
|
@@ -22,7 +22,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
22
22
|
import { Property, EventHandler, Internationalization, NotifyPropertyChanges, detach, getUniqueID } from '@syncfusion/ej2-base';
|
|
23
23
|
import { KeyboardEvents, Event, Browser, L10n, ChildProperty } from '@syncfusion/ej2-base';
|
|
24
24
|
import { addClass, createElement, remove, closest, select, prepend, removeClass, attributes, Collection } from '@syncfusion/ej2-base';
|
|
25
|
-
import { isNullOrUndefined, isUndefined, formatUnit, setValue, rippleEffect, merge, extend } from '@syncfusion/ej2-base';
|
|
25
|
+
import { isNullOrUndefined, isUndefined, formatUnit, setValue, rippleEffect, merge, extend, Touch } from '@syncfusion/ej2-base';
|
|
26
26
|
import { CalendarBase } from '../calendar/calendar';
|
|
27
27
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
28
28
|
import { Button } from '@syncfusion/ej2-buttons';
|
|
@@ -165,7 +165,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
165
165
|
if (this.element.hasAttribute('data-val')) {
|
|
166
166
|
this.element.setAttribute('data-val', 'false');
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
if (this.floatLabelType === 'Auto') {
|
|
169
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
170
|
+
}
|
|
169
171
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
170
172
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
171
173
|
}
|
|
@@ -205,7 +207,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
205
207
|
/**
|
|
206
208
|
* Mobile View
|
|
207
209
|
*/
|
|
208
|
-
this.isMobile = window.matchMedia('(max-width:550px)').matches;
|
|
210
|
+
this.isMobile = (Browser.isDevice && this.fullScreenMode) ? true : window.matchMedia('(max-width:550px)').matches;
|
|
209
211
|
this.inputElement = this.element;
|
|
210
212
|
this.angularTag = null;
|
|
211
213
|
if (this.element.tagName === 'EJS-DATERANGEPICKER') {
|
|
@@ -541,7 +543,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
541
543
|
};
|
|
542
544
|
DateRangePicker.prototype.updateHiddenInput = function () {
|
|
543
545
|
if (this.firstHiddenChild && this.secondHiddenChild) {
|
|
544
|
-
var format = { type: 'datetime', skeleton: 'yMd' };
|
|
546
|
+
var format = { format: this.formatString, type: 'datetime', skeleton: 'yMd' };
|
|
545
547
|
if (typeof this.startDate === 'string') {
|
|
546
548
|
this.startDate = this.globalize.parseDate(this.startDate, format);
|
|
547
549
|
}
|
|
@@ -951,7 +953,6 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
951
953
|
this.trigger('focus', focusArguments);
|
|
952
954
|
}
|
|
953
955
|
this.updateClearIconState();
|
|
954
|
-
this.updateHiddenInput();
|
|
955
956
|
if (this.openOnFocus && !this.preventFocus) {
|
|
956
957
|
this.preventFocus = true;
|
|
957
958
|
this.show();
|
|
@@ -2682,6 +2683,16 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
2682
2683
|
DateRangePicker.prototype.createControl = function () {
|
|
2683
2684
|
var controlContainer = this.createElement('div', { className: RANGECONTAINER });
|
|
2684
2685
|
var headerContainer = this.createElement('div', { className: RANGEHEADER });
|
|
2686
|
+
if (this.isMobile && this.fullScreenMode) {
|
|
2687
|
+
var modelHeaderIconWrapper = this.createElement("div", { className: "e-model-header-wrapper" });
|
|
2688
|
+
var modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
2689
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
2690
|
+
var modelApplyButton = this.createElement("span", { className: "e-apply" });
|
|
2691
|
+
EventHandler.add(modelApplyButton, 'mousedown touchstart', this.applyFunction, this);
|
|
2692
|
+
modelHeaderIconWrapper.appendChild(modelCloseIcon);
|
|
2693
|
+
modelHeaderIconWrapper.appendChild(modelApplyButton);
|
|
2694
|
+
headerContainer.appendChild(modelHeaderIconWrapper);
|
|
2695
|
+
}
|
|
2685
2696
|
var labelContainer = this.createRangeHeader();
|
|
2686
2697
|
headerContainer.appendChild(labelContainer);
|
|
2687
2698
|
var daySpan = this.createElement('div', { className: DAYSPAN });
|
|
@@ -2721,6 +2732,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
2721
2732
|
}
|
|
2722
2733
|
this.renderPopup();
|
|
2723
2734
|
};
|
|
2735
|
+
DateRangePicker.prototype.modelRangeCloseHandler = function (e) {
|
|
2736
|
+
this.hide();
|
|
2737
|
+
};
|
|
2724
2738
|
DateRangePicker.prototype.cancelFunction = function (eve) {
|
|
2725
2739
|
if (document.activeElement !== this.inputElement) {
|
|
2726
2740
|
this.preventFocus = true;
|
|
@@ -2934,7 +2948,24 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
2934
2948
|
this.liCollections = this.presetElement.querySelectorAll('.' + LISTCLASS);
|
|
2935
2949
|
this.wireListEvents();
|
|
2936
2950
|
if (this.isMobile) {
|
|
2937
|
-
|
|
2951
|
+
if (this.fullScreenMode) {
|
|
2952
|
+
var modelWrapper = createElement('div', { className: 'e-range-mob-popup-wrap' });
|
|
2953
|
+
var modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
2954
|
+
var modelTitleSpan = this.createElement("span", { className: "e-model-title" });
|
|
2955
|
+
modelTitleSpan.textContent = "Select Preset";
|
|
2956
|
+
var modelCloseIcon = this.createElement("span", { className: "e-popup-close" });
|
|
2957
|
+
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
2958
|
+
var presetContent = this.presetElement;
|
|
2959
|
+
modelHeader.appendChild(modelCloseIcon);
|
|
2960
|
+
modelHeader.appendChild(modelTitleSpan);
|
|
2961
|
+
modelWrapper.appendChild(modelHeader);
|
|
2962
|
+
modelWrapper.appendChild(presetContent);
|
|
2963
|
+
this.popupWrapper.insertBefore(modelWrapper, this.popupWrapper.firstElementChild);
|
|
2964
|
+
this.presetElement.style.width = '100%';
|
|
2965
|
+
}
|
|
2966
|
+
else {
|
|
2967
|
+
this.presetElement.style.width = this.inputWrapper.container.getBoundingClientRect().width + 'px';
|
|
2968
|
+
}
|
|
2938
2969
|
}
|
|
2939
2970
|
if (!isNullOrUndefined(this.activeIndex) && this.activeIndex > -1) {
|
|
2940
2971
|
addClass([this.liCollections[this.activeIndex]], ACTIVE);
|
|
@@ -2984,6 +3015,15 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
2984
3015
|
enableRtl: this.enableRtl,
|
|
2985
3016
|
zIndex: this.zIndex,
|
|
2986
3017
|
open: function () {
|
|
3018
|
+
if (_this.isMobile && _this.fullScreenMode) {
|
|
3019
|
+
_this.iconRangeRight = _this.calendarElement && window.getComputedStyle(_this.calendarElement.querySelector('.e-header.e-month .e-prev')).cssFloat;
|
|
3020
|
+
if (_this.iconRangeRight) {
|
|
3021
|
+
_this.touchRangeModule = new Touch(_this.calendarElement.querySelector(".e-content.e-month"), {
|
|
3022
|
+
swipe: _this.dateRangeSwipeHandler.bind(_this)
|
|
3023
|
+
});
|
|
3024
|
+
EventHandler.add(_this.calendarElement.querySelector(".e-content.e-month"), "touchstart", _this.touchStartRangeHandler, _this);
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
2987
3027
|
attributes(_this.inputElement, { 'aria-expanded': 'true', 'aria-owns': _this.inputElement.id + '_options' });
|
|
2988
3028
|
if (_this.value) {
|
|
2989
3029
|
attributes(_this.inputElement, { 'aria-activedescendant': _this.inputElement.id });
|
|
@@ -3076,6 +3116,45 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3076
3116
|
}
|
|
3077
3117
|
EventHandler.add(document, 'mousedown touchstart', this.documentHandler, this);
|
|
3078
3118
|
};
|
|
3119
|
+
DateRangePicker.prototype.dateRangeSwipeHandler = function (e) {
|
|
3120
|
+
var direction = 0;
|
|
3121
|
+
if (this.iconRangeRight == 'left') {
|
|
3122
|
+
switch (e.swipeDirection) {
|
|
3123
|
+
case "Left":
|
|
3124
|
+
direction = 1;
|
|
3125
|
+
break;
|
|
3126
|
+
case "Right":
|
|
3127
|
+
direction = -1;
|
|
3128
|
+
break;
|
|
3129
|
+
default:
|
|
3130
|
+
break;
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
else {
|
|
3134
|
+
switch (e.swipeDirection) {
|
|
3135
|
+
case "Up":
|
|
3136
|
+
direction = 1;
|
|
3137
|
+
break;
|
|
3138
|
+
case "Down":
|
|
3139
|
+
direction = -1;
|
|
3140
|
+
break;
|
|
3141
|
+
default:
|
|
3142
|
+
break;
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
if (this.touchRangeStart) {
|
|
3146
|
+
if (direction === 1) {
|
|
3147
|
+
this.navigateNext(e);
|
|
3148
|
+
}
|
|
3149
|
+
else if (direction === -1) {
|
|
3150
|
+
this.navigatePrevious(e);
|
|
3151
|
+
}
|
|
3152
|
+
this.touchRangeStart = false;
|
|
3153
|
+
}
|
|
3154
|
+
};
|
|
3155
|
+
DateRangePicker.prototype.touchStartRangeHandler = function (e) {
|
|
3156
|
+
this.touchRangeStart = true;
|
|
3157
|
+
};
|
|
3079
3158
|
DateRangePicker.prototype.popupCloseHandler = function (e) {
|
|
3080
3159
|
switch (e.keyCode) {
|
|
3081
3160
|
case 27:
|
|
@@ -3327,6 +3406,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3327
3406
|
}
|
|
3328
3407
|
};
|
|
3329
3408
|
DateRangePicker.prototype.createInput = function () {
|
|
3409
|
+
if (this.fullScreenMode && this.isMobile) {
|
|
3410
|
+
this.cssClass = "e-popup-expand";
|
|
3411
|
+
}
|
|
3330
3412
|
var updatedCssClassValue = this.cssClass;
|
|
3331
3413
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
3332
3414
|
updatedCssClassValue = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
@@ -4418,6 +4500,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4418
4500
|
__decorate([
|
|
4419
4501
|
Property(false)
|
|
4420
4502
|
], DateRangePicker.prototype, "openOnFocus", void 0);
|
|
4503
|
+
__decorate([
|
|
4504
|
+
Property(false)
|
|
4505
|
+
], DateRangePicker.prototype, "fullScreenMode", void 0);
|
|
4421
4506
|
__decorate([
|
|
4422
4507
|
Event()
|
|
4423
4508
|
], DateRangePicker.prototype, "created", void 0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventHandler, Internationalization, Property, NotifyPropertyChanges, Browser, RippleOptions } from '@syncfusion/ej2-base';import { Animation, EmitType, Event, AnimationModel, cldrData, getDefaultDateObject, detach } from '@syncfusion/ej2-base';import { createElement, remove, addClass, L10n, removeClass, closest, append, attributes } from '@syncfusion/ej2-base';import { KeyboardEvents, KeyboardEventArgs, isNullOrUndefined, formatUnit, getValue, rippleEffect } from '@syncfusion/ej2-base';import { ModuleDeclaration, extend } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { Input } from '@syncfusion/ej2-inputs';import { BlurEventArgs, ClearedEventArgs, CalendarType, CalendarView, DayHeaderFormats } from '../calendar/calendar';import { DatePicker, PopupObjectArgs } from '../datepicker/datepicker';import { TimePickerBase } from '../timepicker/timepicker';import {MaskPlaceholderModel} from '../common/maskplaceholder-model';
|
|
1
|
+
import { EventHandler, Internationalization, Property, NotifyPropertyChanges, Browser, RippleOptions } from '@syncfusion/ej2-base';import { Animation, EmitType, Event, AnimationModel, cldrData, getDefaultDateObject, detach } from '@syncfusion/ej2-base';import { createElement, remove, addClass, L10n, removeClass, closest, append, attributes } from '@syncfusion/ej2-base';import { KeyboardEvents, KeyboardEventArgs, isNullOrUndefined, formatUnit, getValue, rippleEffect } from '@syncfusion/ej2-base';import { ModuleDeclaration, extend, Touch, SwipeEventArgs } from '@syncfusion/ej2-base';import { Popup } from '@syncfusion/ej2-popups';import { Input } from '@syncfusion/ej2-inputs';import { BlurEventArgs, ClearedEventArgs, CalendarType, CalendarView, DayHeaderFormats } from '../calendar/calendar';import { DatePicker, PopupObjectArgs } from '../datepicker/datepicker';import { TimePickerBase } from '../timepicker/timepicker';import {MaskPlaceholderModel} from '../common/maskplaceholder-model';
|
|
2
2
|
import {DatePickerModel} from "../datepicker/datepicker-model";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -254,6 +254,13 @@ export interface DateTimePickerModel extends DatePickerModel{
|
|
|
254
254
|
*/
|
|
255
255
|
strictMode?: boolean;
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Specifies the component popup display full screen in mobile devices.
|
|
259
|
+
*
|
|
260
|
+
* @default false
|
|
261
|
+
*/
|
|
262
|
+
fullScreenMode?: boolean;
|
|
263
|
+
|
|
257
264
|
/**
|
|
258
265
|
* By default, the date value will be processed based on system time zone.
|
|
259
266
|
* If you want to process the initial date value using server time zone
|