-
Notifications
You must be signed in to change notification settings - Fork 0
[ITEP-19820] Infra UI Maintainance List - Invalid Date Bug Safari #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…thub.com/open-edge-platform/orch-ui into ITEP-19820_InvalidDateBugInSafariBrowser
…thub.com/open-edge-platform/orch-ui into ITEP-19820_InvalidDateBugInSafariBrowser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- apps/infra/src/components/organism/RepeatedScheduleMaintenanceForm/RepeatedScheduleMaintenance.scss: Language not supported
@teone, i may need a |
|
||
.flex-item { | ||
overflow: visible; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the dropdown for repeat date, repeat day, and repeat month selection is hidden due to the new <Flex />
component.
@@ -184,7 +184,8 @@ export const getHumanReadableDuration = (durationSeconds: number) => { | |||
/** Convert date-time in seconds format to `date, hh, mm` format */ | |||
export const getDateTimeFromSeconds = (seconds: number) => { | |||
const dateString = new Date(seconds * 1000).toUTCString().split(" "); | |||
const date = [dateString[1], dateString[2], dateString[3]].join("/"); | |||
// this will return date in `30-Jun-2023` format (which is supported in safari and chrome) | |||
const date = [dateString[1], dateString[2], dateString[3]].join("-"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note previously this was returning 30/Jun/2023
which was not supported in safari macOs
…thub.com/open-edge-platform/orch-ui into ITEP-19820_InvalidDateBugInSafariBrowser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bug is only reproducible in Safari (Mac OS) browser:
Reason:
Javascript Date() in safari doesnot recognize date substitution of format
30/Jun/2023
. This value is converted from the Unix timestampgetDateTimeFromSeconds
in single schedule maintenance.Fix:
Instead
30-Jun-2023
is valid JS format in both safari and chrome.ref: https://stackoverflow.com/questions/4310953/invalid-date-in-safari
After fix
This is tested on chrome (windows)
Mac OS safari browser & chrome browser
...