Skip to content

Commit d4f5bc0

Browse files
committed
fix(scheduled-tasks): preserve monthly anchor when reselecting Monthly
Selecting Monthly from the frequency dropdown hard-reset monthlyMode to day-of-month, silently dropping a previously chosen nth-/last-weekday anchor when switching cadence away and back. Preserve the existing mode on reselect, mirroring how the last recurring cadence is restored across the recurring toggle.
1 parent 0c66cdf commit d4f5bc0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/recurrence-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export function RecurrenceSection({ recurrence, onChange, launchDate }: Recurren
154154
...recurrence,
155155
frequency: 'monthly',
156156
weekdays: [],
157-
monthlyMode: 'day-of-month',
157+
monthlyMode: recurrence.monthlyMode ?? 'day-of-month',
158158
cron: undefined,
159159
})
160160
return

0 commit comments

Comments
 (0)