diff --git a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts index a08f7d2065ff..c703fef11887 100644 --- a/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts +++ b/packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts @@ -25,7 +25,7 @@ export const APPOINTMENT_FORM_GROUP_NAMES = { Recurrence: 'recurrenceGroup', }; -const stylingMode = isFluent(current()) ? 'filled' : undefined; +const getStylingModeFunc = (): string | undefined => (isFluent(current()) ? 'filled' : undefined); const getDateWithStartHour = (date, startDayHour) => new Date(new Date(date).setHours(startDayHour)); @@ -54,7 +54,7 @@ const createDateBoxEditor = (dataField, colSpan, firstDayOfWeek, label, onValueC type: 'required', }], editorOptions: { - stylingMode, + stylingMode: getStylingModeFunc(), width: '100%', calendarOptions: { firstDayOfWeek, @@ -277,7 +277,7 @@ export class AppointmentForm { text: messageLocalization.format('dxScheduler-editorLabelTitle'), }, editorOptions: { - stylingMode, + stylingMode: getStylingModeFunc(), }, }, { @@ -371,7 +371,7 @@ export class AppointmentForm { text: messageLocalization.format('dxScheduler-editorLabelDescription'), }, editorOptions: { - stylingMode, + stylingMode: getStylingModeFunc(), }, }, { diff --git a/packages/devextreme/js/__internal/scheduler/m_recurrence_editor.ts b/packages/devextreme/js/__internal/scheduler/m_recurrence_editor.ts index 394890aad638..5081f1596a66 100644 --- a/packages/devextreme/js/__internal/scheduler/m_recurrence_editor.ts +++ b/packages/devextreme/js/__internal/scheduler/m_recurrence_editor.ts @@ -73,7 +73,7 @@ const repeatEndTypes = [ const days = ['SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA']; -const stylingMode = isFluent(current()) ? 'filled' : undefined; +const getStylingModeFunc = (): string | undefined => (isFluent(current()) ? 'filled' : undefined); class RecurrenceRule { _recurrenceProcessor = getRecurrenceProcessor(); @@ -260,7 +260,7 @@ class RecurrenceEditor extends Editor { editorType: 'dxSelectBox', cssClass: FREQUENCY_EDITOR, editorOptions: { - stylingMode, + stylingMode: getStylingModeFunc(), items: frequencies, value: freq, field: 'freq', @@ -290,7 +290,7 @@ class RecurrenceEditor extends Editor { dataField: 'interval', editorType: 'dxNumberBox', editorOptions: { - stylingMode, + stylingMode: getStylingModeFunc(), format: '#', width: recurrentEditorNumberBoxWidth, min: 1, @@ -386,7 +386,7 @@ class RecurrenceEditor extends Editor { dataField: 'bymonth', editorType: 'dxSelectBox', editorOptions: { - stylingMode, + stylingMode: getStylingModeFunc(), field: 'bymonth', items: months, value: this._monthOfYearByRules(), @@ -410,7 +410,7 @@ class RecurrenceEditor extends Editor { dataField: 'bymonthday', editorType: 'dxNumberBox', editorOptions: { - stylingMode, + stylingMode: getStylingModeFunc(), min: 1, max: 31, format: '#', @@ -607,7 +607,7 @@ class RecurrenceEditor extends Editor { .appendTo($editorWrapper); this._repeatCountEditor = this._createComponent(this._$repeatCountEditor, NumberBox, { - stylingMode, + stylingMode: getStylingModeFunc(), field: 'count', format: '#', width: recurrentEditorNumberBoxWidth, @@ -651,7 +651,7 @@ class RecurrenceEditor extends Editor { .appendTo($editorWrapper); this._repeatUntilDate = this._createComponent(this._$repeatDateEditor, DateBox, { - stylingMode, + stylingMode: getStylingModeFunc(), field: 'until', value: repeatUntil, type: 'date',