@openui5/sap.ui.unified 1.109.0 → 1.111.0
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/.reuse/dep5 +16 -16
- package/THIRDPARTY.txt +2 -2
- package/package.json +2 -2
- package/src/sap/ui/unified/.library +2 -2
- package/src/sap/ui/unified/Calendar.js +82 -44
- package/src/sap/ui/unified/CalendarAppointment.js +8 -9
- package/src/sap/ui/unified/CalendarDateInterval.js +12 -7
- package/src/sap/ui/unified/CalendarDateIntervalRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarLegend.js +138 -6
- package/src/sap/ui/unified/CalendarLegendItem.js +2 -2
- package/src/sap/ui/unified/CalendarLegendRenderer.js +13 -5
- package/src/sap/ui/unified/CalendarMonthInterval.js +16 -16
- package/src/sap/ui/unified/CalendarMonthIntervalRenderer.js +4 -4
- package/src/sap/ui/unified/CalendarOneMonthInterval.js +2 -2
- package/src/sap/ui/unified/CalendarOneMonthIntervalRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarRenderer.js +4 -4
- package/src/sap/ui/unified/CalendarRow.js +17 -7
- package/src/sap/ui/unified/CalendarRowRenderer.js +1 -1
- package/src/sap/ui/unified/CalendarTimeInterval.js +34 -19
- package/src/sap/ui/unified/CalendarTimeIntervalRenderer.js +4 -4
- package/src/sap/ui/unified/CalendarWeekInterval.js +2 -2
- package/src/sap/ui/unified/ColorPicker.js +2 -2
- package/src/sap/ui/unified/ColorPickerDisplayMode.js +1 -1
- package/src/sap/ui/unified/ColorPickerPopover.js +2 -2
- package/src/sap/ui/unified/ColorPickerRenderer.js +1 -1
- package/src/sap/ui/unified/ContentSwitcher.js +2 -2
- package/src/sap/ui/unified/ContentSwitcherRenderer.js +2 -2
- package/src/sap/ui/unified/Currency.js +3 -3
- package/src/sap/ui/unified/CurrencyRenderer.js +2 -2
- package/src/sap/ui/unified/DateRange.js +14 -2
- package/src/sap/ui/unified/DateTypeRange.js +2 -2
- package/src/sap/ui/unified/FileUploader.js +23 -24
- package/src/sap/ui/unified/FileUploaderHttpRequestMethod.js +1 -1
- package/src/sap/ui/unified/FileUploaderParameter.js +2 -2
- package/src/sap/ui/unified/FileUploaderRenderer.js +1 -1
- package/src/sap/ui/unified/FileUploaderXHRSettings.js +2 -2
- package/src/sap/ui/unified/Menu.js +12 -30
- package/src/sap/ui/unified/MenuItem.js +2 -2
- package/src/sap/ui/unified/MenuItemBase.js +2 -2
- package/src/sap/ui/unified/MenuRenderer.js +2 -2
- package/src/sap/ui/unified/MenuTextFieldItem.js +5 -5
- package/src/sap/ui/unified/Shell.js +2 -2
- package/src/sap/ui/unified/ShellHeadItem.js +2 -2
- package/src/sap/ui/unified/ShellHeadUserItem.js +2 -2
- package/src/sap/ui/unified/ShellHeader.js +1 -1
- package/src/sap/ui/unified/ShellLayout.js +2 -2
- package/src/sap/ui/unified/ShellLayoutRenderer.js +1 -1
- package/src/sap/ui/unified/ShellOverlay.js +2 -2
- package/src/sap/ui/unified/ShellOverlayRenderer.js +1 -1
- package/src/sap/ui/unified/ShellRenderer.js +1 -1
- package/src/sap/ui/unified/SplitContainer.js +2 -2
- package/src/sap/ui/unified/SplitContainerRenderer.js +2 -2
- package/src/sap/ui/unified/calendar/CalendarDate.js +10 -9
- package/src/sap/ui/unified/calendar/CalendarUtils.js +11 -23
- package/src/sap/ui/unified/calendar/CustomMonthPicker.js +1 -1
- package/src/sap/ui/unified/calendar/CustomYearPicker.js +1 -1
- package/src/sap/ui/unified/calendar/DatesRow.js +26 -16
- package/src/sap/ui/unified/calendar/DatesRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/Header.js +2 -2
- package/src/sap/ui/unified/calendar/HeaderRenderer.js +1 -4
- package/src/sap/ui/unified/calendar/IndexPicker.js +2 -2
- package/src/sap/ui/unified/calendar/IndexPickerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/Month.js +63 -43
- package/src/sap/ui/unified/calendar/MonthPicker.js +2 -2
- package/src/sap/ui/unified/calendar/MonthPickerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/MonthRenderer.js +34 -10
- package/src/sap/ui/unified/calendar/MonthsRow.js +25 -24
- package/src/sap/ui/unified/calendar/MonthsRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/OneMonthDatesRow.js +2 -2
- package/src/sap/ui/unified/calendar/OneMonthDatesRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/TimesRow.js +34 -13
- package/src/sap/ui/unified/calendar/TimesRowRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/YearPicker.js +24 -27
- package/src/sap/ui/unified/calendar/YearPickerRenderer.js +1 -1
- package/src/sap/ui/unified/calendar/YearRangePicker.js +5 -5
- package/src/sap/ui/unified/calendar/YearRangePickerRenderer.js +1 -1
- package/src/sap/ui/unified/designtime/Calendar.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/CalendarDateInterval.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/CalendarLegend.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/Currency.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/FileUploader.designtime.js +1 -1
- package/src/sap/ui/unified/designtime/library.designtime.js +1 -1
- package/src/sap/ui/unified/library.js +6 -13
- package/src/sap/ui/unified/library.support.js +1 -1
- package/src/sap/ui/unified/messagebundle.properties +4 -0
- package/src/sap/ui/unified/messagebundle_ar.properties +3 -0
- package/src/sap/ui/unified/messagebundle_bg.properties +13 -10
- package/src/sap/ui/unified/messagebundle_ca.properties +3 -0
- package/src/sap/ui/unified/messagebundle_cs.properties +3 -0
- package/src/sap/ui/unified/messagebundle_cy.properties +3 -0
- package/src/sap/ui/unified/messagebundle_da.properties +3 -0
- package/src/sap/ui/unified/messagebundle_de.properties +3 -0
- package/src/sap/ui/unified/messagebundle_el.properties +3 -0
- package/src/sap/ui/unified/messagebundle_en.properties +3 -0
- package/src/sap/ui/unified/messagebundle_en_GB.properties +3 -0
- package/src/sap/ui/unified/messagebundle_en_US_sappsd.properties +3 -0
- package/src/sap/ui/unified/messagebundle_en_US_saprigi.properties +5 -0
- package/src/sap/ui/unified/messagebundle_en_US_saptrc.properties +3 -0
- package/src/sap/ui/unified/messagebundle_es.properties +6 -3
- package/src/sap/ui/unified/messagebundle_es_MX.properties +3 -0
- package/src/sap/ui/unified/messagebundle_et.properties +3 -0
- package/src/sap/ui/unified/messagebundle_fi.properties +3 -0
- package/src/sap/ui/unified/messagebundle_fr.properties +3 -0
- package/src/sap/ui/unified/messagebundle_fr_CA.properties +3 -0
- package/src/sap/ui/unified/messagebundle_hi.properties +3 -0
- package/src/sap/ui/unified/messagebundle_hr.properties +5 -2
- package/src/sap/ui/unified/messagebundle_hu.properties +3 -0
- package/src/sap/ui/unified/messagebundle_id.properties +3 -0
- package/src/sap/ui/unified/messagebundle_it.properties +3 -0
- package/src/sap/ui/unified/messagebundle_iw.properties +3 -0
- package/src/sap/ui/unified/messagebundle_ja.properties +3 -0
- package/src/sap/ui/unified/messagebundle_kk.properties +3 -0
- package/src/sap/ui/unified/messagebundle_ko.properties +3 -0
- package/src/sap/ui/unified/messagebundle_lt.properties +3 -0
- package/src/sap/ui/unified/messagebundle_lv.properties +3 -0
- package/src/sap/ui/unified/messagebundle_ms.properties +3 -0
- package/src/sap/ui/unified/messagebundle_nl.properties +3 -0
- package/src/sap/ui/unified/messagebundle_no.properties +3 -0
- package/src/sap/ui/unified/messagebundle_pl.properties +3 -0
- package/src/sap/ui/unified/messagebundle_pt.properties +3 -0
- package/src/sap/ui/unified/messagebundle_pt_PT.properties +3 -0
- package/src/sap/ui/unified/messagebundle_ro.properties +3 -0
- package/src/sap/ui/unified/messagebundle_ru.properties +3 -0
- package/src/sap/ui/unified/messagebundle_sh.properties +3 -0
- package/src/sap/ui/unified/messagebundle_sk.properties +3 -0
- package/src/sap/ui/unified/messagebundle_sl.properties +3 -0
- package/src/sap/ui/unified/messagebundle_sv.properties +3 -0
- package/src/sap/ui/unified/messagebundle_th.properties +3 -0
- package/src/sap/ui/unified/messagebundle_tr.properties +3 -0
- package/src/sap/ui/unified/messagebundle_uk.properties +3 -0
- package/src/sap/ui/unified/messagebundle_vi.properties +3 -0
- package/src/sap/ui/unified/messagebundle_zh_CN.properties +3 -0
- package/src/sap/ui/unified/messagebundle_zh_TW.properties +3 -0
- package/src/sap/ui/unified/rules/FileUploader.support.js +1 -1
- package/src/sap/ui/unified/themes/base/Calendar.less +3 -8
- package/src/sap/ui/unified/themes/base/CalendarLegend.less +19 -0
- package/src/sap/ui/unified/themes/base/Menu.less +8 -0
- package/src/sap/ui/unified/themes/base/library.source.less +1 -1
- package/src/sap/ui/unified/themes/sap_hcb/library.source.less +1 -1
package/.reuse/dep5
CHANGED
|
@@ -28,7 +28,7 @@ Disclaimer: The code in this project may include calls to APIs (“API Calls”)
|
|
|
28
28
|
# OpenUI5 code
|
|
29
29
|
|
|
30
30
|
Files: *
|
|
31
|
-
Copyright: 2009-
|
|
31
|
+
Copyright: 2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
32
32
|
License: Apache-2.0
|
|
33
33
|
|
|
34
34
|
|
|
@@ -68,7 +68,7 @@ Comment: these files belong to: jQuery UI
|
|
|
68
68
|
|
|
69
69
|
Files: src/sap.ui.commons/src/sap/ui/commons/Carousel.js
|
|
70
70
|
Copyright:
|
|
71
|
-
2009-
|
|
71
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
72
72
|
Spencer Tipping
|
|
73
73
|
License: Apache-2.0 and MIT
|
|
74
74
|
Comment: these files contain content from SAP and jquery.fix.clone: Carousel.js is authored by SAP, but contains an improved implementation of the clone function which is taken from jquery-fix-clone
|
|
@@ -83,35 +83,35 @@ Comment: these files belong to: jQuery 3
|
|
|
83
83
|
|
|
84
84
|
Files: src/sap.ui.core/src/sap/base/util/isPlainObject.js
|
|
85
85
|
Copyright:
|
|
86
|
-
2009-
|
|
86
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
87
87
|
OpenJS Foundation and other contributors
|
|
88
88
|
License: Apache-2.0 and MIT
|
|
89
89
|
Comment: these files contain content from SAP and jQuery 3: isPlainObject.js is overall written by SAP, but contains a modified implementation of jQuery.isPlainObject taken from jQuery
|
|
90
90
|
|
|
91
91
|
Files: src/sap.ui.core/src/sap/base/util/_merge.js
|
|
92
92
|
Copyright:
|
|
93
|
-
2009-
|
|
93
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
94
94
|
OpenJS Foundation and other contributors
|
|
95
95
|
License: Apache-2.0 and MIT
|
|
96
96
|
Comment: these files contain content from SAP and jQuery 3: _merge.js is overall written by SAP, but contains a modified implementation of jQuery.extend taken from jQuery
|
|
97
97
|
|
|
98
98
|
Files: src/sap.ui.core/src/jquery.sap.script.js
|
|
99
99
|
Copyright:
|
|
100
|
-
2009-
|
|
100
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
101
101
|
OpenJS Foundation and other contributors
|
|
102
102
|
License: Apache-2.0 and MIT
|
|
103
103
|
Comment: these files contain content from SAP and jQuery 3: jquery.sap.script.js is overall written by SAP, but contains a modified implementation of jQuery.extend taken from jQuery
|
|
104
104
|
|
|
105
105
|
Files: src/sap.ui.core/src/sap/ui/Device.js
|
|
106
106
|
Copyright:
|
|
107
|
-
2009-
|
|
107
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
108
108
|
2011, John Resig
|
|
109
109
|
License: Apache-2.0 and MIT
|
|
110
110
|
Comment: these files contain content from SAP and jQuery 1: Device.js is overall written by SAP, but contains code taken from jQuery 1.7.1 (see the respective comment)
|
|
111
111
|
|
|
112
112
|
Files: src/sap.ui.core/src/sap/ui/dom/jquery/Selectors.js
|
|
113
113
|
Copyright:
|
|
114
|
-
2009-
|
|
114
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
115
115
|
2014 jQuery Foundation and other contributors
|
|
116
116
|
License: Apache-2.0 and MIT
|
|
117
117
|
Comment: these files contain content from SAP and jQuery UI 1.8: Selectors.js is overall written by SAP, but contains code taken from jQuery UI (see the respective comments)
|
|
@@ -123,14 +123,14 @@ Comment: these files belong to: jQuery UI 1.10
|
|
|
123
123
|
|
|
124
124
|
Files: src/sap.ui.core/src/jquery.sap.dom.js
|
|
125
125
|
Copyright:
|
|
126
|
-
2009-
|
|
126
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
127
127
|
2014 jQuery Foundation and other contributors
|
|
128
128
|
License: Apache-2.0 and MIT
|
|
129
129
|
Comment: these files contain content from SAP and jQuery UI 1.10: jquery.sap.dom.js is overall written by SAP, but contains code taken from jQuery UI Core (see the respective comment)
|
|
130
130
|
|
|
131
131
|
Files: src/sap.ui.core/src/sap/ui/dom/jquery/zIndex.js
|
|
132
132
|
Copyright:
|
|
133
|
-
2009-
|
|
133
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
134
134
|
2014 jQuery Foundation and other contributors
|
|
135
135
|
License: Apache-2.0 and MIT
|
|
136
136
|
Comment: these files contain content from SAP and jQuery UI 1.11: zIndex.js is overall written by SAP, but contains an implementation of the function 'fnzIndex' which is taken from jQuery UI Datepicker 1.11.1
|
|
@@ -162,7 +162,7 @@ Comment: these files belong to: jQuery Mobile
|
|
|
162
162
|
|
|
163
163
|
Files: src/sap.ui.core/src/sap/ui/util/_FeatureDetection.js
|
|
164
164
|
Copyright:
|
|
165
|
-
2009-
|
|
165
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
166
166
|
2012 Wei-Ko Kao
|
|
167
167
|
License: Apache-2.0 and MIT
|
|
168
168
|
Comment: these files contain content from SAP and jQuery.rtl-scroll-type: _FeatureDetection.js is overall written by SAP, but contains code which is inspired by jQuery.rtl-scroll-type
|
|
@@ -299,14 +299,14 @@ Comment: these files belong to: blanket.js
|
|
|
299
299
|
|
|
300
300
|
Files: src/sap.ui.core/src/sap/base/util/JSTokenizer.js
|
|
301
301
|
Copyright:
|
|
302
|
-
2009-
|
|
302
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
303
303
|
Douglas Crockford
|
|
304
304
|
License: Apache-2.0 and LicenseRef-JSONinJSPublicDomain
|
|
305
305
|
Comment: these files contain content from SAP and JSON in JS: JSTokenizer.js is overall written by SAP, but contains code has been taken from the component JSON in JavaScript (https://github.com/douglascrockford/JSON-js/blob/master/json2.js) from Douglas Crockford which is licensed under Public Domain
|
|
306
306
|
|
|
307
307
|
Files: src/sap.ui.core/src/sap/ui/base/ExpressionParser.js
|
|
308
308
|
Copyright:
|
|
309
|
-
2009-
|
|
309
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
310
310
|
2010 Douglas Crockford
|
|
311
311
|
License: Apache-2.0
|
|
312
312
|
Comment: these files contain content from SAP and Top Down Operator Precedence: ExpressionParser.js is overall written by SAP, but contains code taken from or inspired by TDOP by Douglas Crockford (see the respective comment)
|
|
@@ -340,7 +340,7 @@ Comment: these files contain content from p-cancelable and @babel/helpers: _Canc
|
|
|
340
340
|
|
|
341
341
|
Files: src/sap.ui.core/src/sap/ui/core/date/Persian.js
|
|
342
342
|
Copyright:
|
|
343
|
-
2009-
|
|
343
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
344
344
|
Behrang Norouzinia
|
|
345
345
|
License: Apache-2.0 and MIT
|
|
346
346
|
Comment: these files contain content from SAP and Jalaali JS: Persian.js is overall written by SAP, but the calculation is taken from jalaali-js
|
|
@@ -352,14 +352,14 @@ Comment: these files belong to: vkBeautify
|
|
|
352
352
|
|
|
353
353
|
Files: src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js
|
|
354
354
|
Copyright:
|
|
355
|
-
2009-
|
|
355
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
356
356
|
Isaac Z. Schlueter and Contributors
|
|
357
357
|
License: Apache-2.0 and ISC
|
|
358
358
|
Comment: these files contain content from SAP and node-lru-cache: LRUPersistentCache.js is overall written by SAP, but portions ('Least Recently Used' logic) are taken from the node-lru-cache project (see https://github.com/isaacs/node-lru-cache/blob/v2.7.3/README.md) and modified.
|
|
359
359
|
|
|
360
360
|
Files: src/sap.ui.core/test/sap/ui/core/qunit/i18n/helper/_timezones.js
|
|
361
361
|
Copyright:
|
|
362
|
-
2009-
|
|
362
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
363
363
|
Arthur David Olson, Paul Eggert and other contributors
|
|
364
364
|
License: Apache-2.0 and LicenseRef-tzdata-PublicDomain
|
|
365
365
|
Comment: these files contain content from SAP and Time Zone Database: _timezones.js is overall written by SAP, but the list of IANA timezone IDs is taken from the Timezone Database
|
|
@@ -469,7 +469,7 @@ Comment: these files belong to: LESS
|
|
|
469
469
|
|
|
470
470
|
Files: lib/jsdoc/ui5/plugin.js
|
|
471
471
|
Copyright:
|
|
472
|
-
2009-
|
|
472
|
+
2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
|
|
473
473
|
2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
|
|
474
474
|
License: Apache-2.0
|
|
475
475
|
Comment: these files contain content from SAP and JSDoc 3: plugin.js is overall written by SAP, but contains code taken from JSDoc 3.6.7 (see the respective comments)
|
package/THIRDPARTY.txt
CHANGED
|
@@ -185,7 +185,7 @@ License: Apache-2.0
|
|
|
185
185
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
186
186
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js
|
|
187
187
|
|
|
188
|
-
Component: Unicode Common Locale Data Repository, version:
|
|
188
|
+
Component: Unicode Common Locale Data Repository, version: 41
|
|
189
189
|
Copyright: 1991-2014 Unicode, Inc.
|
|
190
190
|
License: Unicode-DFS-2015
|
|
191
191
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Unicode-DFS-2015.txt
|
|
@@ -478,7 +478,7 @@ License: Apache-2.0
|
|
|
478
478
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
479
479
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
480
480
|
|
|
481
|
-
Component: SAP Theming Base Content, version: 11.1.
|
|
481
|
+
Component: SAP Theming Base Content, version: 11.1.48
|
|
482
482
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
483
483
|
License: Apache-2.0
|
|
484
484
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.unified",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.111.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.unified",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.ui.core": "1.
|
|
17
|
+
"@openui5/sap.ui.core": "1.111.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<name>sap.ui.unified</name>
|
|
5
5
|
<vendor>SAP SE</vendor>
|
|
6
6
|
<copyright>OpenUI5
|
|
7
|
-
* (c) Copyright 2009-
|
|
7
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.111.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>Unified controls intended for both, mobile and desktop scenarios</documentation>
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
//Provides control sap.ui.unified.Calendar.
|
|
@@ -17,7 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
'./calendar/YearPicker',
|
|
18
18
|
'./calendar/YearRangePicker',
|
|
19
19
|
'./calendar/CalendarDate',
|
|
20
|
-
|
|
20
|
+
'sap/ui/core/date/UniversalDate',
|
|
21
|
+
'sap/ui/core/date/UI5Date',
|
|
21
22
|
'./library',
|
|
22
23
|
'sap/ui/Device',
|
|
23
24
|
'sap/ui/core/format/DateFormat',
|
|
@@ -44,6 +45,7 @@ sap.ui.define([
|
|
|
44
45
|
YearRangePicker,
|
|
45
46
|
CalendarDate,
|
|
46
47
|
UniversalDate,
|
|
48
|
+
UI5Date,
|
|
47
49
|
library,
|
|
48
50
|
Device,
|
|
49
51
|
DateFormat,
|
|
@@ -74,7 +76,7 @@ sap.ui.define([
|
|
|
74
76
|
* Basic Calendar.
|
|
75
77
|
* This calendar is used for DatePickers
|
|
76
78
|
* @extends sap.ui.core.Control
|
|
77
|
-
* @version 1.
|
|
79
|
+
* @version 1.111.0
|
|
78
80
|
*
|
|
79
81
|
* @constructor
|
|
80
82
|
* @public
|
|
@@ -207,7 +209,14 @@ sap.ui.define([
|
|
|
207
209
|
* Note: This property should not be used with firstDayOfWeek property.
|
|
208
210
|
* @since 1.108.0
|
|
209
211
|
*/
|
|
210
|
-
calendarWeekNumbering : { type : "sap.ui.core.date.CalendarWeekNumbering", group : "Appearance", defaultValue: null}
|
|
212
|
+
calendarWeekNumbering : { type : "sap.ui.core.date.CalendarWeekNumbering", group : "Appearance", defaultValue: null},
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Holds a reference to a JavaScript Date Object to define the initially navigated date in the calendar.
|
|
216
|
+
*
|
|
217
|
+
* @since 1.111
|
|
218
|
+
*/
|
|
219
|
+
initialFocusedDate: {type: "object", group: "Data", defaultValue: null}
|
|
211
220
|
|
|
212
221
|
},
|
|
213
222
|
aggregations : {
|
|
@@ -561,6 +570,10 @@ sap.ui.define([
|
|
|
561
570
|
|
|
562
571
|
this._updateHeadersButtons();
|
|
563
572
|
|
|
573
|
+
this._updateLegendParent();
|
|
574
|
+
if (this.getInitialFocusedDate()) {
|
|
575
|
+
this.focusDate(this.getInitialFocusedDate());
|
|
576
|
+
}
|
|
564
577
|
};
|
|
565
578
|
|
|
566
579
|
Calendar.prototype.onAfterRendering = function(oEvent){
|
|
@@ -629,9 +642,10 @@ sap.ui.define([
|
|
|
629
642
|
this._oSpecialDatesControlOrigin = oControl;
|
|
630
643
|
};
|
|
631
644
|
|
|
632
|
-
|
|
633
|
-
*
|
|
634
|
-
* To
|
|
645
|
+
/**
|
|
646
|
+
* If used inside DatePicker get the value from the parent
|
|
647
|
+
* To not have sync issues...
|
|
648
|
+
* @returns {sap.ui.unified.DateTypeRange[]} Array with special dates
|
|
635
649
|
*/
|
|
636
650
|
Calendar.prototype.getSpecialDates = function(){
|
|
637
651
|
|
|
@@ -665,10 +679,10 @@ sap.ui.define([
|
|
|
665
679
|
};
|
|
666
680
|
|
|
667
681
|
/**
|
|
668
|
-
*
|
|
682
|
+
* Sets the locale for the DatePicker
|
|
669
683
|
* only for internal use
|
|
670
684
|
* @param {string} sLocale new value for <code>locale</code>
|
|
671
|
-
* @returns {this} <code>this</code>
|
|
685
|
+
* @returns {this} Reference to <code>this</code> for method chaining
|
|
672
686
|
* @private
|
|
673
687
|
*/
|
|
674
688
|
Calendar.prototype.setLocale = function(sLocale){
|
|
@@ -685,9 +699,9 @@ sap.ui.define([
|
|
|
685
699
|
};
|
|
686
700
|
|
|
687
701
|
/**
|
|
688
|
-
*
|
|
702
|
+
* Gets the used locale for the DatePicker
|
|
689
703
|
* only for internal use
|
|
690
|
-
* @
|
|
704
|
+
* @returns {string} sLocale
|
|
691
705
|
* @private
|
|
692
706
|
*/
|
|
693
707
|
Calendar.prototype.getLocale = function(){
|
|
@@ -700,8 +714,8 @@ sap.ui.define([
|
|
|
700
714
|
|
|
701
715
|
};
|
|
702
716
|
/**
|
|
703
|
-
*
|
|
704
|
-
* @
|
|
717
|
+
* Gets the focused date
|
|
718
|
+
* @returns {sap.ui.unified.calendar.CalendarDate} The focused date
|
|
705
719
|
* @private
|
|
706
720
|
*/
|
|
707
721
|
Calendar.prototype._getFocusedDate = function(){
|
|
@@ -726,8 +740,8 @@ sap.ui.define([
|
|
|
726
740
|
/**
|
|
727
741
|
* Displays and sets the focused date of the calendar.
|
|
728
742
|
*
|
|
729
|
-
* @param {
|
|
730
|
-
* @returns {this} <code>this</code>
|
|
743
|
+
* @param {Date} oDate A JavaScript date object for focused date
|
|
744
|
+
* @returns {this} Reference to <code>this</code> for method chaining
|
|
731
745
|
* @public
|
|
732
746
|
*/
|
|
733
747
|
Calendar.prototype.focusDate = function(oDate) {
|
|
@@ -742,9 +756,8 @@ sap.ui.define([
|
|
|
742
756
|
/**
|
|
743
757
|
* Displays a date in the calendar but doesn't set the focus.
|
|
744
758
|
*
|
|
745
|
-
* @param {
|
|
746
|
-
*
|
|
747
|
-
* @returns {this} <code>this</code> to allow method chaining
|
|
759
|
+
* @param {Date} oDate JavaScript date object for focused date
|
|
760
|
+
* @returns {this} Reference to <code>this</code> for method chaining
|
|
748
761
|
* @since 1.28.0
|
|
749
762
|
* @public
|
|
750
763
|
*/
|
|
@@ -761,7 +774,7 @@ sap.ui.define([
|
|
|
761
774
|
*
|
|
762
775
|
* There might be some days of the previous month shown, but they can not be focused.
|
|
763
776
|
*
|
|
764
|
-
* @returns {
|
|
777
|
+
* @returns {Date} JavaScript date object for start date
|
|
765
778
|
* @since 1.34.1
|
|
766
779
|
* @public
|
|
767
780
|
*/
|
|
@@ -795,6 +808,7 @@ sap.ui.define([
|
|
|
795
808
|
|
|
796
809
|
return this;
|
|
797
810
|
};
|
|
811
|
+
|
|
798
812
|
Calendar.prototype.setMonths = function(iMonths){
|
|
799
813
|
|
|
800
814
|
this._bDateRangeChanged = undefined; // to force rerendering
|
|
@@ -814,10 +828,9 @@ sap.ui.define([
|
|
|
814
828
|
oMonth.attachEvent("_bindMousemove", _handleBindMousemove, this);
|
|
815
829
|
oMonth.attachEvent("_unbindMousemove", _handleUnbindMousemove, this);
|
|
816
830
|
oMonth._bNoThemeChange = true;
|
|
817
|
-
oMonth._bNotInTabChain = true;
|
|
818
831
|
oMonth.setCalendarWeekNumbering(this.getCalendarWeekNumbering());
|
|
819
832
|
oMonth.setSecondaryCalendarType(this._getSecondaryCalendarType());
|
|
820
|
-
this.addAggregation("month",oMonth);
|
|
833
|
+
this.addAggregation("month", oMonth);
|
|
821
834
|
}
|
|
822
835
|
this._toggleTwoMonthsInTwoColumnsCSS();
|
|
823
836
|
} else if (aMonths.length > iMonths){
|
|
@@ -952,7 +965,7 @@ sap.ui.define([
|
|
|
952
965
|
/**
|
|
953
966
|
* Sets a minimum date for the calendar.
|
|
954
967
|
* @param {Date} oDate a JavaScript date
|
|
955
|
-
* @
|
|
968
|
+
* @returns {this} Reference to <code>this</code> for method chaining
|
|
956
969
|
* @public
|
|
957
970
|
*/
|
|
958
971
|
Calendar.prototype.setMinDate = function(oDate){
|
|
@@ -974,7 +987,7 @@ sap.ui.define([
|
|
|
974
987
|
this._oMinDate = CalendarDate.fromLocalJSDate(oDate, sPrimaryCalendarType);
|
|
975
988
|
|
|
976
989
|
var iYear = this._oMinDate.getYear();
|
|
977
|
-
CalendarUtils._checkYearInValidRange(iYear);
|
|
990
|
+
CalendarUtils._checkYearInValidRange(iYear, sPrimaryCalendarType);
|
|
978
991
|
|
|
979
992
|
if (this._oMaxDate.isBefore(this._oMinDate)) {
|
|
980
993
|
Log.warning("minDate > maxDate -> maxDate set to end of the month", this);
|
|
@@ -1006,13 +1019,13 @@ sap.ui.define([
|
|
|
1006
1019
|
/**
|
|
1007
1020
|
* Sets a maximum date for the calendar.
|
|
1008
1021
|
* @param {Date} oDate a JavaScript date
|
|
1009
|
-
* @
|
|
1022
|
+
* @returns {this} Reference to <code>this</code> for method chaining
|
|
1010
1023
|
* @public
|
|
1011
1024
|
*/
|
|
1012
1025
|
Calendar.prototype.setMaxDate = function(oDate){
|
|
1013
1026
|
|
|
1014
1027
|
var aMonths = this.getAggregation("month"),
|
|
1015
|
-
sPrimaryCalendarType,
|
|
1028
|
+
sPrimaryCalendarType = this.getPrimaryCalendarType(),
|
|
1016
1029
|
iMaxYear;
|
|
1017
1030
|
|
|
1018
1031
|
if (deepEqual(oDate, this.getMaxDate())) {
|
|
@@ -1028,7 +1041,7 @@ sap.ui.define([
|
|
|
1028
1041
|
this._oMaxDate = CalendarDate.fromLocalJSDate(oDate, sPrimaryCalendarType);
|
|
1029
1042
|
|
|
1030
1043
|
var iYear = this._oMaxDate.getYear();
|
|
1031
|
-
CalendarUtils._checkYearInValidRange(iYear);
|
|
1044
|
+
CalendarUtils._checkYearInValidRange(iYear, sPrimaryCalendarType);
|
|
1032
1045
|
|
|
1033
1046
|
if (this._oMinDate.isAfter(this._oMaxDate)) {
|
|
1034
1047
|
Log.warning("maxDate < minDate -> minDate set to begin of the month", this);
|
|
@@ -1060,7 +1073,7 @@ sap.ui.define([
|
|
|
1060
1073
|
* Sets the visibility of the Current date button in the calendar.
|
|
1061
1074
|
*
|
|
1062
1075
|
* @param {boolean} bShow whether the Today button will be displayed
|
|
1063
|
-
* @
|
|
1076
|
+
* @returns {this} Reference to <code>this</code> for method chaining
|
|
1064
1077
|
* @public
|
|
1065
1078
|
*/
|
|
1066
1079
|
Calendar.prototype.setShowCurrentDateButton = function(bShow){
|
|
@@ -1119,7 +1132,7 @@ sap.ui.define([
|
|
|
1119
1132
|
|
|
1120
1133
|
/**
|
|
1121
1134
|
* Getter for monthPicker aggregation.
|
|
1122
|
-
* @
|
|
1135
|
+
* @returns {sap.ui.unified.calendar.MonthPicker} The monthPicker control instance
|
|
1123
1136
|
* @private
|
|
1124
1137
|
*/
|
|
1125
1138
|
Calendar.prototype._getMonthPicker = function () {
|
|
@@ -1128,7 +1141,7 @@ sap.ui.define([
|
|
|
1128
1141
|
|
|
1129
1142
|
/**
|
|
1130
1143
|
* Getter for yearPicker aggregation.
|
|
1131
|
-
* @
|
|
1144
|
+
* @returns {sap.ui.unified.calendar.YearPicker} The yearPicker control instance
|
|
1132
1145
|
* @private
|
|
1133
1146
|
*/
|
|
1134
1147
|
Calendar.prototype._getYearPicker = function () {
|
|
@@ -1137,7 +1150,7 @@ sap.ui.define([
|
|
|
1137
1150
|
|
|
1138
1151
|
/**
|
|
1139
1152
|
* Getter for yearPicker aggregation.
|
|
1140
|
-
* @
|
|
1153
|
+
* @returns {sap.ui.unified.calendar.YearRangePicker} The yearRangePicker control instance
|
|
1141
1154
|
* @private
|
|
1142
1155
|
*/
|
|
1143
1156
|
Calendar.prototype._getYearRangePicker = function () {
|
|
@@ -1291,6 +1304,13 @@ sap.ui.define([
|
|
|
1291
1304
|
this._toggleTwoMonthsInTwoColumnsCSS();
|
|
1292
1305
|
};
|
|
1293
1306
|
|
|
1307
|
+
Calendar.prototype._updateLegendParent = function(){
|
|
1308
|
+
var sLegend = this.getLegend(),
|
|
1309
|
+
oLegend = oCore.byId(sLegend);
|
|
1310
|
+
|
|
1311
|
+
oLegend && oLegend._setParent(this);
|
|
1312
|
+
};
|
|
1313
|
+
|
|
1294
1314
|
/**
|
|
1295
1315
|
* @param {sap.ui.unified.calendar.CalendarDate} oDate A date to be used for the header buttons
|
|
1296
1316
|
* @private
|
|
@@ -1377,7 +1397,7 @@ sap.ui.define([
|
|
|
1377
1397
|
* Enables/Disables previous and next buttons in the year picker header.
|
|
1378
1398
|
* This function assumes there is a "yearPicker" aggregation.
|
|
1379
1399
|
* So callers must take care.
|
|
1380
|
-
* @
|
|
1400
|
+
* @returns {void}
|
|
1381
1401
|
* @private
|
|
1382
1402
|
*/
|
|
1383
1403
|
Calendar.prototype._togglePrevNexYearPicker = function(){
|
|
@@ -1403,7 +1423,7 @@ sap.ui.define([
|
|
|
1403
1423
|
oHighDate.setYear(oHighDate.getYear() + (iRangeSize * iYears) / 2 - 1);
|
|
1404
1424
|
} else {
|
|
1405
1425
|
iYears = oYearPicker.getYears();
|
|
1406
|
-
oDate = oYearPicker.getProperty("_middleDate") ? oYearPicker.getProperty("_middleDate") : CalendarDate.fromLocalJSDate(
|
|
1426
|
+
oDate = oYearPicker.getProperty("_middleDate") ? oYearPicker.getProperty("_middleDate") : CalendarDate.fromLocalJSDate(UI5Date.getInstance());
|
|
1407
1427
|
oLowDate = new CalendarDate(oDate);
|
|
1408
1428
|
oHighDate = new CalendarDate(oDate);
|
|
1409
1429
|
|
|
@@ -1419,7 +1439,7 @@ sap.ui.define([
|
|
|
1419
1439
|
* Handles navigation to previous date.
|
|
1420
1440
|
* This function assumes there are both "yearPicker" & "monthPicker" aggregation available.
|
|
1421
1441
|
* So callers must take care.
|
|
1422
|
-
* @
|
|
1442
|
+
* @returns {void}
|
|
1423
1443
|
* @private
|
|
1424
1444
|
*/
|
|
1425
1445
|
Calendar.prototype._handlePrevious = function(oEvent){
|
|
@@ -1479,7 +1499,7 @@ sap.ui.define([
|
|
|
1479
1499
|
* Handles navigation to next date.
|
|
1480
1500
|
* This function assumes there are both "yearPicker" & "monthPicker" aggregation available.
|
|
1481
1501
|
* So callers must take care.
|
|
1482
|
-
* @
|
|
1502
|
+
* @returns {void}
|
|
1483
1503
|
* @private
|
|
1484
1504
|
*/
|
|
1485
1505
|
Calendar.prototype._handleNext = function(oEvent){
|
|
@@ -1557,7 +1577,7 @@ sap.ui.define([
|
|
|
1557
1577
|
* @private
|
|
1558
1578
|
*/
|
|
1559
1579
|
Calendar.prototype._handleCurrentDate = function() {
|
|
1560
|
-
var oNow =
|
|
1580
|
+
var oNow = UI5Date.getInstance(),
|
|
1561
1581
|
oMaxDate = this.getMaxDate(),
|
|
1562
1582
|
oMinDate = this.getMinDate();
|
|
1563
1583
|
|
|
@@ -1690,6 +1710,12 @@ sap.ui.define([
|
|
|
1690
1710
|
this.setProperty("_currentPicker", CURRENT_PICKERS.MONTH);
|
|
1691
1711
|
// show again hidden month button
|
|
1692
1712
|
this._togglePrevNext(this._getFocusedDate(), true);
|
|
1713
|
+
|
|
1714
|
+
if (this.getAggregation("month").length > 1) {
|
|
1715
|
+
this.getAggregation("month").forEach(function(oMonth) {
|
|
1716
|
+
oMonth._oItemNavigation.iActiveTabIndex = 0;
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1693
1719
|
};
|
|
1694
1720
|
|
|
1695
1721
|
Calendar.prototype._setDisabledMonths = function(iYear, oMonthPicker) {
|
|
@@ -1791,7 +1817,7 @@ sap.ui.define([
|
|
|
1791
1817
|
/**
|
|
1792
1818
|
* Updates visibility of active Header month button
|
|
1793
1819
|
* Only for internal use
|
|
1794
|
-
* @returns {this} <code>this</code>
|
|
1820
|
+
* @returns {this} Reference to <code>this</code> for method chaining
|
|
1795
1821
|
* @private
|
|
1796
1822
|
*/
|
|
1797
1823
|
Calendar.prototype._updateMonthButtonVisibility = function(){
|
|
@@ -1810,7 +1836,7 @@ sap.ui.define([
|
|
|
1810
1836
|
* Shows an embedded Month Picker.
|
|
1811
1837
|
* This function assumes there is a "monthPicker" & "yearPicker" aggregation.
|
|
1812
1838
|
* So callers must take care.
|
|
1813
|
-
* @
|
|
1839
|
+
* @returns {void}
|
|
1814
1840
|
* @private
|
|
1815
1841
|
*/
|
|
1816
1842
|
Calendar.prototype._showMonthPicker = function (bSkipFocus) {
|
|
@@ -1843,6 +1869,12 @@ sap.ui.define([
|
|
|
1843
1869
|
this._setDisabledMonths(oDate.getYear(), oMonthPicker);
|
|
1844
1870
|
}
|
|
1845
1871
|
|
|
1872
|
+
if (this.getAggregation("month").length > 1 && this.getProperty("_currentPicker") == CURRENT_PICKERS.MONTH_PICKER) {
|
|
1873
|
+
this.getAggregation("month").forEach(function(oMonth) {
|
|
1874
|
+
oMonth._oItemNavigation.iActiveTabIndex = -1;
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1846
1878
|
this._togglePrevNext(oDate, true);
|
|
1847
1879
|
this._setHeaderText(this._getFocusedDate());
|
|
1848
1880
|
};
|
|
@@ -1851,7 +1883,7 @@ sap.ui.define([
|
|
|
1851
1883
|
* Shows an embedded year Picker.
|
|
1852
1884
|
* This function assumes there is a "yearPicker" aggregation.
|
|
1853
1885
|
* So callers must take care.
|
|
1854
|
-
* @
|
|
1886
|
+
* @returns {void}
|
|
1855
1887
|
* @private
|
|
1856
1888
|
*/
|
|
1857
1889
|
Calendar.prototype._showYearPicker = function () {
|
|
@@ -1880,6 +1912,12 @@ sap.ui.define([
|
|
|
1880
1912
|
oYearPicker.setDate(oDate.toLocalJSDate());
|
|
1881
1913
|
this._updateHeadersYearPrimaryText(this._getYearString());
|
|
1882
1914
|
}
|
|
1915
|
+
|
|
1916
|
+
if (this.getAggregation("month").length > 1 && this.getProperty("_currentPicker") == CURRENT_PICKERS.YEAR_PICKER) {
|
|
1917
|
+
this.getAggregation("month").forEach(function(oMonth) {
|
|
1918
|
+
oMonth._oItemNavigation.iActiveTabIndex = -1;
|
|
1919
|
+
});
|
|
1920
|
+
}
|
|
1883
1921
|
};
|
|
1884
1922
|
|
|
1885
1923
|
/**
|
|
@@ -2161,8 +2199,7 @@ sap.ui.define([
|
|
|
2161
2199
|
oFocusedDate = oDate;
|
|
2162
2200
|
|
|
2163
2201
|
this._focusDate(oFocusedDate, true, false, false);
|
|
2164
|
-
this.
|
|
2165
|
-
this.setProperty("_currentPicker", CURRENT_PICKERS.MONTH);
|
|
2202
|
+
this._closePickers();
|
|
2166
2203
|
this._addMonthFocusDelegate();
|
|
2167
2204
|
this._setHeaderText(this._getFocusedDate());
|
|
2168
2205
|
};
|
|
@@ -2251,7 +2288,7 @@ sap.ui.define([
|
|
|
2251
2288
|
/**
|
|
2252
2289
|
* Updates visibility of active Header Year button
|
|
2253
2290
|
* Only for internal use
|
|
2254
|
-
* @returns {this} <code>this</code>
|
|
2291
|
+
* @returns {this} Reference to <code>this</code> for method chaining
|
|
2255
2292
|
* @private
|
|
2256
2293
|
*/
|
|
2257
2294
|
Calendar.prototype._updateActiveHeaderYearButtonVisibility = function(){
|
|
@@ -2508,7 +2545,7 @@ sap.ui.define([
|
|
|
2508
2545
|
this._oFocusedDate = CalendarDate.fromLocalJSDate(aSelectedDates[0].getStartDate(), sCalendarType);
|
|
2509
2546
|
} else {
|
|
2510
2547
|
// use current date
|
|
2511
|
-
this._oFocusedDate = CalendarDate.fromLocalJSDate(
|
|
2548
|
+
this._oFocusedDate = CalendarDate.fromLocalJSDate(UI5Date.getInstance(), sCalendarType);
|
|
2512
2549
|
}
|
|
2513
2550
|
|
|
2514
2551
|
if (this._oFocusedDate.isBefore(this._oMinDate)) {
|
|
@@ -2680,16 +2717,17 @@ sap.ui.define([
|
|
|
2680
2717
|
function _displayDate(oDate, bSkipFocus) {
|
|
2681
2718
|
|
|
2682
2719
|
var oCalDate,
|
|
2720
|
+
sPrimaryCalendarType = this.getPrimaryCalendarType(),
|
|
2683
2721
|
iYear;
|
|
2684
2722
|
|
|
2685
2723
|
if (!oDate) {
|
|
2686
2724
|
return;
|
|
2687
2725
|
}
|
|
2688
2726
|
|
|
2689
|
-
oCalDate = CalendarDate.fromLocalJSDate(oDate,
|
|
2727
|
+
oCalDate = CalendarDate.fromLocalJSDate(oDate, sPrimaryCalendarType);
|
|
2690
2728
|
|
|
2691
2729
|
iYear = oCalDate.getYear();
|
|
2692
|
-
CalendarUtils._checkYearInValidRange(iYear);
|
|
2730
|
+
CalendarUtils._checkYearInValidRange(iYear, sPrimaryCalendarType);
|
|
2693
2731
|
|
|
2694
2732
|
if (CalendarUtils._isOutside(oCalDate, this._oMinDate, this._oMaxDate)) {
|
|
2695
2733
|
throw new Error("Date must not be in valid range (minDate and maxDate); " + this);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
21
21
|
*
|
|
22
22
|
* Applications could inherit from this element to add own fields.
|
|
23
23
|
* @extends sap.ui.unified.DateTypeRange
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.111.0
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @public
|
|
@@ -141,7 +141,7 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
141
141
|
iHour, iMinute, sHour, sMinute;
|
|
142
142
|
|
|
143
143
|
//have no intersection with the given day
|
|
144
|
-
if (oStartDate.getTime()
|
|
144
|
+
if (oStartDate.getTime() > oNextDayStart.getTime() || oEndDate.getTime() < oCurrentDayStart.getTime()) {
|
|
145
145
|
sFirstLineText = "";
|
|
146
146
|
} else if (oStartDate.getTime() <= oCurrentDayStart.getTime() && oEndDate.getTime() >= oNextDayStart.getTime()) {
|
|
147
147
|
sFirstLineText = oResourceBundle.getText("PLANNINGCALENDAR_ALLDAY");
|
|
@@ -279,14 +279,13 @@ sap.ui.define(['./DateTypeRange', 'sap/ui/core/format/DateFormat', 'sap/ui/core/
|
|
|
279
279
|
* @private
|
|
280
280
|
*/
|
|
281
281
|
CalendarAppointment.prototype._convertToTimezone = function(oDate) {
|
|
282
|
-
var
|
|
283
|
-
var
|
|
282
|
+
var sConfigTimezone = Core.getConfiguration().getTimezone();
|
|
283
|
+
var sLocalTimezone = TimezoneUtil.getLocalTimezone();
|
|
284
284
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
oNewDate = TimezoneUtil.convertToTimezone(oNewDate, sTimezone);
|
|
285
|
+
var iConfigOffsetMillis = TimezoneUtil.calculateOffset(oDate, sConfigTimezone) * 1000;
|
|
286
|
+
var iLocalOffsetMillis = TimezoneUtil.calculateOffset(oDate, sLocalTimezone) * 1000;
|
|
288
287
|
|
|
289
|
-
return
|
|
288
|
+
return new Date(oDate.getTime() - iConfigOffsetMillis + iLocalOffsetMillis);
|
|
290
289
|
};
|
|
291
290
|
|
|
292
291
|
return CalendarAppointment;
|