-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui5-calendar): implement calendar week numbering (#9694)
With this feature you can select one of four options to sete to the Calendar, DatePicker, DateTimePicker, DateRangePicker components. Default -Determined by active format locale ISO_8601 - Official calendar week numbering in most of Europe (ISO 8601standard) WesternTraditional -Official calendar week numbering in the United States, Canada, Brazil, Israel, Japan, and other countries MiddleEastern - Official calendar week numbering in much of the Middle East It can be used as: <ui5-calendar id="calendar10" calendar-week-numbering="WesternTraditional"> <ui5-date value="Jan 1, 2023"></ui5-date-range> </ui5-calendar> This property will control the week numbering and the first day of the week in a way explained in the enumeration documentation.
- Loading branch information
1 parent
d8a1196
commit efc8053
Showing
23 changed files
with
267 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type CaledndarUtilsOpenui5T from "sap/ui/core/date/CalendarUtils"; | ||
// @ts-ignore | ||
import CalendarUtilsNative from "./sap/ui/core/date/CalendarUtils.js"; | ||
|
||
const CalendarUtilsWrapped = CalendarUtilsNative as typeof CaledndarUtilsOpenui5T; | ||
const CalendarUtils = CalendarUtilsWrapped; | ||
|
||
export default CalendarUtils; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* The <code>CalendarWeekNumbering</code> enum defines how to calculate calendar weeks. Each | ||
* value defines: | ||
* - The first day of the week, | ||
* - The first week of the year. | ||
* | ||
* @public | ||
* @since 2.2.0 | ||
*/ | ||
|
||
enum CalendarWeekNumbering { | ||
|
||
/** | ||
* The default calendar week numbering: | ||
* | ||
* The framework determines the week numbering scheme; currently it is derived from the | ||
* active format locale. Future versions of ui5-webcomponents might select a different week numbering | ||
* scheme. | ||
* | ||
* @public | ||
*/ | ||
Default = "Default", | ||
|
||
/** | ||
* Official calendar week numbering in most of Europe (ISO 8601 standard): | ||
* Monday is first day of the week, the week containing January 4th is first week of the year. | ||
* | ||
* @public | ||
*/ | ||
ISO_8601 = "ISO_8601", | ||
|
||
/** | ||
* Official calendar week numbering in much of the Middle East (Middle Eastern calendar): | ||
* Saturday is first day of the week, the week containing January 1st is first week of the year. | ||
* | ||
* @public | ||
*/ | ||
MiddleEastern = "MiddleEastern", | ||
|
||
/** | ||
* Official calendar week numbering in the United States, Canada, Brazil, Israel, Japan, and | ||
* other countries (Western traditional calendar): | ||
* Sunday is first day of the week, the week containing January 1st is first week of the year. | ||
* | ||
* @public | ||
*/ | ||
WesternTraditional = "WesternTraditional", | ||
} | ||
|
||
export default CalendarWeekNumbering; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.