Skip to content

Commit

Permalink
Fix dialog isFluent problem (#25830)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raushen authored Oct 18, 2023
1 parent 358e407 commit 541c7fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -54,7 +54,7 @@ const createDateBoxEditor = (dataField, colSpan, firstDayOfWeek, label, onValueC
type: 'required',
}],
editorOptions: {
stylingMode,
stylingMode: getStylingModeFunc(),
width: '100%',
calendarOptions: {
firstDayOfWeek,
Expand Down Expand Up @@ -277,7 +277,7 @@ export class AppointmentForm {
text: messageLocalization.format('dxScheduler-editorLabelTitle'),
},
editorOptions: {
stylingMode,
stylingMode: getStylingModeFunc(),
},
},
{
Expand Down Expand Up @@ -371,7 +371,7 @@ export class AppointmentForm {
text: messageLocalization.format('dxScheduler-editorLabelDescription'),
},
editorOptions: {
stylingMode,
stylingMode: getStylingModeFunc(),
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -260,7 +260,7 @@ class RecurrenceEditor extends Editor {
editorType: 'dxSelectBox',
cssClass: FREQUENCY_EDITOR,
editorOptions: {
stylingMode,
stylingMode: getStylingModeFunc(),
items: frequencies,
value: freq,
field: 'freq',
Expand Down Expand Up @@ -290,7 +290,7 @@ class RecurrenceEditor extends Editor {
dataField: 'interval',
editorType: 'dxNumberBox',
editorOptions: {
stylingMode,
stylingMode: getStylingModeFunc(),
format: '#',
width: recurrentEditorNumberBoxWidth,
min: 1,
Expand Down Expand Up @@ -386,7 +386,7 @@ class RecurrenceEditor extends Editor {
dataField: 'bymonth',
editorType: 'dxSelectBox',
editorOptions: {
stylingMode,
stylingMode: getStylingModeFunc(),
field: 'bymonth',
items: months,
value: this._monthOfYearByRules(),
Expand All @@ -410,7 +410,7 @@ class RecurrenceEditor extends Editor {
dataField: 'bymonthday',
editorType: 'dxNumberBox',
editorOptions: {
stylingMode,
stylingMode: getStylingModeFunc(),
min: 1,
max: 31,
format: '#',
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 541c7fe

Please sign in to comment.