@@ -39,10 +39,11 @@ const E2E_TEST_CLASSES = {
3939 recurrenceSwitch : 'e2e-dx-scheduler-form-recurrence-switch' ,
4040} ;
4141
42- const DEFAULT_TIMEZONE_EDITOR_DATA_SOURCE_OPTIONS = {
42+ const createTimeZoneDataSource = ( ) => new DataSource ( {
43+ store : timeZoneUtils . getTimeZonesCache ( ) ,
4344 paginate : true ,
4445 pageSize : 10 ,
45- } ;
46+ } ) ;
4647
4748const getStylingModeFunc = ( ) : string | undefined => ( isFluent ( current ( ) ) ? 'filled' : undefined ) ;
4849
@@ -191,6 +192,7 @@ export class AppointmentForm {
191192 valueExpr : 'id' ,
192193 placeholder : noTzTitle ,
193194 searchEnabled : true ,
195+ dataSource : createTimeZoneDataSource ( ) ,
194196 onValueChanged : ( args ) => {
195197 const { form } = this ;
196198 const secondTimezoneEditor = form . getEditor ( secondTimeZoneExpr ) ;
@@ -426,16 +428,6 @@ export class AppointmentForm {
426428 editor && this . form . itemOption ( editorPath , 'editorOptions' , extend ( { } , editor . editorOptions , options ) ) ;
427429 }
428430
429- private setupTimezoneEditorDataSource ( editorName : string ) : void {
430- const timezones = timeZoneUtils . getTimeZonesCache ( ) ;
431- const dataSource = new DataSource ( {
432- ...DEFAULT_TIMEZONE_EDITOR_DATA_SOURCE_OPTIONS ,
433- store : timezones ,
434- } ) ;
435-
436- this . setEditorOptions ( editorName , 'Main' , { dataSource } ) ;
437- }
438-
439431 updateFormData ( formData : Record < string , any > ) : void {
440432 this . isFormUpdating = true ;
441433 this . form . option ( 'formData' , formData ) ;
@@ -448,9 +440,6 @@ export class AppointmentForm {
448440 const allDay = dataAccessors . get ( 'allDay' , formData ) ;
449441 const startDate = new Date ( rawStartDate ) ;
450442
451- this . setupTimezoneEditorDataSource ( expr . startDateTimeZoneExpr ) ;
452- this . setupTimezoneEditorDataSource ( expr . endDateTimeZoneExpr ) ;
453-
454443 this . updateRecurrenceEditorStartDate ( startDate , expr . recurrenceRuleExpr ) ;
455444
456445 this . setEditorsType ( allDay ) ;
0 commit comments