FirstDayOfWeek -> DayOfWeek#33523
Merged
mpreyskurantov merged 6 commits intoDevExpress:26_1from May 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes weekday typing across DevExtreme by introducing DevExpress.common.DayOfWeek (0–6) and migrating Scheduler/Calendar/Gantt firstDayOfWeek and Scheduler hiddenWeekDays typings to use it, while keeping FirstDayOfWeek as a deprecated alias. This aligns the public typings with the Scheduler “hide arbitrary days of the week” work in #33188.
Changes:
- Added
DevExpress.common.DayOfWeekand deprecatedDevExpress.common.FirstDayOfWeekin favor of it. - Updated core TS declarations (
dx.all.d.ts,common.d.ts, UI component.d.ts) and internal TS types to useDayOfWeek. - Updated Angular/React/Vue wrapper typings to reference
DayOfWeek(and adjustedhiddenWeekDaysoptionality).
Reviewed changes
Copilot reviewed 24 out of 32 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/ts/dx.all.d.ts | Introduces DevExpress.common.DayOfWeek, deprecates FirstDayOfWeek, updates component option typings and Scheduler hiddenWeekDays. |
| packages/devextreme/ts/aliases.d.ts | Adds deprecated alias DevExpress.common.FirstDayOfWeek = DayOfWeek for compatibility in aliased typings. |
| packages/devextreme/js/ui/scheduler.d.ts | Switches Scheduler typings to import/export DayOfWeek from common and updates firstDayOfWeek/hiddenWeekDays option types. |
| packages/devextreme/js/ui/scheduler_types.d.ts | Updates re-export surface for Scheduler types to include DayOfWeek. |
| packages/devextreme/js/ui/gantt.d.ts | Migrates Gantt firstDayOfWeek option typing to DayOfWeek. |
| packages/devextreme/js/ui/calendar.d.ts | Switches Calendar typings to import/export DayOfWeek from common and updates firstDayOfWeek option type. |
| packages/devextreme/js/ui/calendar_types.d.ts | Updates re-export surface for Calendar types to include DayOfWeek. |
| packages/devextreme/js/common.d.ts | Adds DayOfWeek and marks FirstDayOfWeek as deprecated alias. |
| packages/devextreme/js/__internal/ui/calendar/calendar.views.ts | Updates internal Calendar view props to use DayOfWeek. |
| packages/devextreme/js/__internal/scheduler/m_scheduler.ts | Updates internal Scheduler getFirstDayOfWeek() typing to return DayOfWeek. |
| packages/devextreme/js/__internal/scheduler/header/types.ts | Updates Scheduler header option types to use DayOfWeek. |
| packages/devextreme-vue/src/scheduler.ts | Updates Vue Scheduler wrapper prop typing for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-vue/src/gantt.ts | Updates Vue Gantt wrapper prop typing for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-vue/src/date-range-box.ts | Updates Vue DateRangeBox calendarOptions firstDayOfWeek prop typing to use DayOfWeek. |
| packages/devextreme-vue/src/date-box.ts | Updates Vue DateBox calendarOptions firstDayOfWeek prop typing to use DayOfWeek. |
| packages/devextreme-vue/src/common/index.ts | Exposes DayOfWeek from the Vue common re-export surface. |
| packages/devextreme-vue/src/calendar.ts | Updates Vue Calendar wrapper prop typing for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-react/src/scheduler.ts | Updates React Scheduler wrapper types to use DayOfWeek from common and adjusts hiddenWeekDays optionality. |
| packages/devextreme-react/src/date-range-box.ts | Updates React DateRangeBox calendarOptions firstDayOfWeek typing to use DayOfWeek. |
| packages/devextreme-react/src/date-box.ts | Updates React DateBox calendarOptions firstDayOfWeek typing to use DayOfWeek. |
| packages/devextreme-react/src/common/index.ts | Exposes DayOfWeek from the React common re-export surface. |
| packages/devextreme-metadata/aspnet/enums.ts | Removes weekday numeric enum-item renaming mapping from ASP.NET metadata generation inputs. |
| packages/devextreme-angular/src/ui/scheduler/nested/view-dxi.ts | Updates Angular Scheduler nested view option types (firstDayOfWeek, hiddenWeekDays) to use DayOfWeek. |
| packages/devextreme-angular/src/ui/scheduler/index.ts | Updates Angular Scheduler component option/event typings to use DayOfWeek and adjusts hiddenWeekDays optionality. |
| packages/devextreme-angular/src/ui/nested/view-dxi.ts | Updates shared Angular nested view typing for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-angular/src/ui/nested/base/calendar-options.ts | Updates Angular calendar-options base nested option typing for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-angular/src/ui/gantt/index.ts | Updates Angular Gantt component option/event typings for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-angular/src/ui/date-range-box/nested/calendar-options.ts | Updates Angular DateRangeBox nested calendar-options typing for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-angular/src/ui/date-box/nested/calendar-options.ts | Updates Angular DateBox nested calendar-options typing for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-angular/src/ui/calendar/index.ts | Updates Angular Calendar component option/event typings for firstDayOfWeek to use DayOfWeek. |
| packages/devextreme-angular/src/index.ts | Exposes DayOfWeek on the Angular package Common namespace surface. |
| packages/devextreme-angular/src/common/index.ts | Exposes DayOfWeek from the Angular common re-export surface. |
Comments suppressed due to low confidence (1)
packages/devextreme-metadata/aspnet/enums.ts:428
enumItemRenamingsno longer contains the numeric-to-name mapping for weekday values. After renamingFirstDayOfWeektoDayOfWeek, the ASP.NET metadata generator will likely need the same mapping under the new enum/type name (e.g.,0 -> Sunday, ...,6 -> Saturday) to keep generated enum member names stable and readable.
export const enumItemRenamings = {
'.*': {
'dx(.*)': '$1',
},
'(.*FilterOperations|.*SearchMode|ComparisonOperator)': {
'>=': 'greaterThanOrEqual',
'<=': 'lessThanOrEqual',
'<>': 'notEqual',
'===': 'strictEqual',
'!==': 'notStrictEqual',
'==': 'equal',
'!=': 'notEqual',
'=': 'equal',
'>': 'greaterThan',
'<': 'lessThan',
'startswith': 'startsWith',
'endswith': 'endsWith',
'isblank': 'isBlank',
'isnotblank': 'isNotBlank',
'anyof': 'anyOf',
'noneof': 'noneOf',
'notcontains': 'notContains',
},
'(.*Data|DateBox)Type': {
'datetime': 'DateTime',
},
'GaugeOverlappingBehavior': {
'first': 'HideFirstLabel',
'last': 'HideLastLabel',
},
…and components' bags re-exports (our own demos failed), try to avoid prev error with aliases.d.ts (no more) + dx.all.d.ts
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 32 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/devextreme-metadata/aspnet/enums.ts:427
enumItemRenamingsno longer contains a mapping for the day-of-week numeric union values. Since the corresponding public type was renamed toDayOfWeek, the ASP.NET metadata generator likely needs an equivalentDayOfWeekmapping (0..6 → Sunday..Saturday) to avoid generating invalid or less-friendly enum member names.
'(.*Data|DateBox)Type': {
'datetime': 'DateTime',
},
'GaugeOverlappingBehavior': {
'first': 'HideFirstLabel',
'last': 'HideLastLabel',
},
sjbur
previously approved these changes
May 7, 2026
…OfWeek type instead deprecation/deprecation)
marker-dao
approved these changes
May 8, 2026
sjbur
approved these changes
May 8, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch for:
Known issues / observations:
...