Skip to content

Commit 448b3cd

Browse files
authored
Scheduler: T1308870 - startDate popup toolbar items should remain visible when allDay and repeat switches are toggled (#31938)
1 parent c3f2e8c commit 448b3cd

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,33 @@ describe('Appointment popup form', () => {
719719
doneButton = POM.popup.getDoneButton();
720720
expect(doneButton.getAttribute('aria-label')).toBe('Done');
721721
});
722+
723+
it('(T1308870): startDate popup toolbar items should remain visible when allDay and repeat switches are toggled', async () => {
724+
const { scheduler } = await createScheduler({
725+
dataSource: [],
726+
views: ['week'],
727+
currentView: 'week',
728+
currentDate: new Date(2017, 4, 25),
729+
});
730+
731+
scheduler.showAppointmentPopup();
732+
733+
const appointmentForm = scheduler._appointmentForm.dxForm;
734+
const startDate = appointmentForm.getEditor('startDate');
735+
const toolbarItemsBefore = startDate._getPopupToolbarItems();
736+
737+
const allDay = appointmentForm.getEditor('allDay');
738+
allDay.option('value', true);
739+
740+
const repeat = appointmentForm.getEditor('repeat');
741+
repeat.option('value', true);
742+
743+
const startDateAfter = appointmentForm.getEditor('startDate');
744+
const toolbarItemsAfter = startDateAfter._getPopupToolbarItems();
745+
746+
expect(toolbarItemsBefore.length).toBe(3);
747+
expect(toolbarItemsAfter.length).toBe(3);
748+
});
722749
});
723750

724751
describe('Appointment Popup and Recurrence Editor visibility', () => {

packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ export class AppointmentForm {
454454
editorOptions: {
455455
stylingMode: getStylingModeFunc(),
456456
width: '100%',
457+
applyValueMode: 'useButtons',
457458
calendarOptions: {
458459
firstDayOfWeek,
459460
},

0 commit comments

Comments
 (0)