Client - move default date format first in select

This commit is contained in:
Sam 2022-11-01 14:24:08 +01:00
parent af4984f3bc
commit 60bf3718d7
2 changed files with 4 additions and 4 deletions

View File

@ -88,8 +88,8 @@ export const formatWorkoutDate = (
}
const availableDateFormats = [
'dd/MM/yyyy',
'MM/dd/yyyy',
'dd/MM/yyyy',
'yyyy-MM-dd',
'date_string',
]

View File

@ -359,8 +359,8 @@ describe('availableDateFormatOptions', () => {
{
inputLanguage: 'en',
expectedOptions: [
{ label: 'dd/MM/yyyy - 09/10/2022', value: 'dd/MM/yyyy' },
{ label: 'MM/dd/yyyy - 10/09/2022', value: 'MM/dd/yyyy' },
{ label: 'dd/MM/yyyy - 09/10/2022', value: 'dd/MM/yyyy' },
{ label: 'yyyy-MM-dd - 2022-10-09', value: 'yyyy-MM-dd' },
{ label: 'MMM. do, yyyy - Oct. 9th, 2022', value: 'date_string' },
],
@ -368,8 +368,8 @@ describe('availableDateFormatOptions', () => {
{
inputLanguage: 'fr',
expectedOptions: [
{ label: 'dd/MM/yyyy - 09/10/2022', value: 'dd/MM/yyyy' },
{ label: 'MM/dd/yyyy - 10/09/2022', value: 'MM/dd/yyyy' },
{ label: 'dd/MM/yyyy - 09/10/2022', value: 'dd/MM/yyyy' },
{ label: 'yyyy-MM-dd - 2022-10-09', value: 'yyyy-MM-dd' },
{ label: 'd MMM yyyy - 9 oct. 2022', value: 'date_string' },
],
@ -377,8 +377,8 @@ describe('availableDateFormatOptions', () => {
{
inputLanguage: 'de',
expectedOptions: [
{ label: 'dd/MM/yyyy - 09/10/2022', value: 'dd/MM/yyyy' },
{ label: 'MM/dd/yyyy - 10/09/2022', value: 'MM/dd/yyyy' },
{ label: 'dd/MM/yyyy - 09/10/2022', value: 'dd/MM/yyyy' },
{ label: 'yyyy-MM-dd - 2022-10-09', value: 'yyyy-MM-dd' },
{ label: 'do MMM yyyy - 9. Okt. 2022', value: 'date_string' },
],