Skip to content
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

STCOM-1150v2 #2036

Open
wants to merge 5 commits into
base: b10.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Timepicker/Timepicker.js
Expand Up @@ -88,8 +88,8 @@ class Timepicker extends React.Component {

// Set locale
this.locale = props.locale || props.intl.locale;
if (moment.locales().includes(this.locale)) {
moment.locale(this.locale);
moment.locale(this.locale);
if (moment.locale() === this.locale.toLowerCase()) {
this._timeFormat = moment.localeData()._longDateFormat.LT;
} else {
this._timeFormat = getLocalizedTimeFormatInfo(this.locale).timeFormat;
Expand Down
4 changes: 2 additions & 2 deletions util/dateTimeUtils.js
Expand Up @@ -48,7 +48,7 @@ export const getLocaleDateFormat = ({ intl }) => {
format = getMomentLocalizedFormat(intl);
}

return format;
return format.replaceAll('\u202f', ' ');
};

// getLocalizedTimeFormatInfo() -
Expand Down Expand Up @@ -128,7 +128,7 @@ export function getLocalizedTimeFormatInfo(locale) {

return {
...formatInfo,
timeFormat,
timeFormat: timeFormat.replaceAll('\u202f', ' '),
dayPeriods: [...dpOptions],
};
}