mirror of
https://github.com/directus/directus.git
synced 2026-01-30 12:08:14 -05:00
Align displayed time for 24 hours format (#11703)
This commit is contained in:
@@ -70,7 +70,8 @@ export default defineComponent({
|
||||
displayValue.value = null;
|
||||
return;
|
||||
}
|
||||
const timeFormat = props.includeSeconds ? 'date-fns_time' : 'date-fns_time_no_seconds';
|
||||
let timeFormat = props.includeSeconds ? 'date-fns_time' : 'date-fns_time_no_seconds';
|
||||
if (props.use24) timeFormat = props.includeSeconds ? 'date-fns_time_24hour' : 'date-fns_time_no_seconds_24hour';
|
||||
let format = `${t('date-fns_date')} ${t(timeFormat)}`;
|
||||
if (props.type === 'date') format = String(t('date-fns_date'));
|
||||
if (props.type === 'time') format = String(t(timeFormat));
|
||||
|
||||
@@ -363,6 +363,8 @@ delete_share: Delete Share
|
||||
date-fns_date: PPP
|
||||
date-fns_time: 'h:mm:ss a'
|
||||
date-fns_time_no_seconds: 'h:mm a'
|
||||
date-fns_time_24hour: 'HH:mm:ss'
|
||||
date-fns_time_no_seconds_24hour: 'HH:mm'
|
||||
date-fns_date_short: 'MMM d, u'
|
||||
date-fns_time_short: 'h:mma'
|
||||
date-fns_date_short_no_year: MMM d
|
||||
|
||||
Reference in New Issue
Block a user