Fix Schedule At DatePicker showing Invalid Date and resetting on poll#593
Merged
Fix Schedule At DatePicker showing Invalid Date and resetting on poll#593
Conversation
The studio-ui-bundle DatePicker calls toDayJs(value) without passing the outputFormat, so DD-MM-YYYY HH:mm strings cannot be parsed — resulting in 'Invalid Date' display after selection. Since we cannot modify the studio-ui-bundle, this works around the bug by: - Converting scheduledAt between backend format (DD-MM-YYYY HH:mm) and ISO-8601 in the transformers, since ISO strings are natively parseable by dayjs without a format hint - Removing outputFormat from the DatePicker so fromDayJs() produces ISO strings via value.format() - Isolating RTK Query tags to prevent mutations from triggering background refetches that would destroy form state - Extracting polling/progress logic into an ExecutionStatus child component so poll-driven re-renders don't reset the DatePicker's unconfirmed selection
markus-moser
approved these changes
Apr 8, 2026
Use outputFormat that dayjs can parse natively without a format hint, so toDayJs() in the studio-ui-bundle still works without modification.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Fixes the "Schedule At" DatePicker in the execution tab:
toDayJs()doesn't receive theoutputFormatfor parsingDD-MM-YYYY HH:mmstrings. Worked around by convertingscheduledAtto/from ISO-8601 in the data-importer's transformers — ISO strings are natively parseable by dayjs.checkImportProgresspolling (every 5s) caused the DatePicker's unconfirmed selection to reset. Fixed by extracting polling/progress logic into an isolatedExecutionStatuschild component so poll-driven re-renders don't propagate to form fields.Bundle Data Importertag, so any mutation (start import, cancel, save, upload) would invalidate all queries includingconfigGet— causing background refetches that could destroy form state. Fixed by overriding all endpoint tags to[]in the enhanced API slice.Changes
transformers.ts— AddedscheduledAtToForm()/scheduledAtToBackend()conversion between backendDD-MM-YYYY HH:mmand ISO-8601execution-tab.tsx— RemovedoutputFormatfrom DatePicker, simplified to stateless form fields +ExecutionStatuschildexecution-status.tsx— New component: extracted polling, optimistic state, mutations, progress bar from ExecutionTabdata-importer-api-slice-enhanced.ts— Overrode all endpoint tags to[]to prevent cross-endpoint cache invalidation; added 3 hook re-exports for the execution-status component