-
Notifications
You must be signed in to change notification settings - Fork 14
[45885] Start Timer Event configuration affected by the user's profile date format #465
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: develop
Are you sure you want to change the base?
Conversation
src/components/FormDatePicker.vue
Outdated
| }, | ||
| format() { | ||
| return this.datepicker ? getUserDateTimeFormat() : getUserDateFormat(); | ||
| let format = this.datepicker ? getUserDateTimeFormat() : getUserDateFormat(); |
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.
add a fallback control
format = format || 'YYYY-MM-DD'; // fallback
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 functions getUserDateTimeFormat() and getUserDateFormat() already have a fallback defined.
src/components/FormDatePicker.vue
Outdated
| const hasTimePattern = /[Hh]{1,2}:[mM]{1,2}/.test(format); | ||
| if (!hasTimePattern) { | ||
| // If forceDateTime is true and no time pattern exists, ensure the format includes hh:mm A | ||
| format = format.replace(/[\sHh:msaAzZ]/g, '') + ' hh:mm A'; |
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.
is posible use
format =${format} hh:mm A;
instead of replace?
f4b84c9 to
7879400
Compare
|





Ticket FOUR-25088
According to the date picker configuration, if it is a datetime type, a hh:mm is added by default if the date and time configuration does not have the time.