diff --git a/apps/web/src/app/(signing)/sign/[token]/form.tsx b/apps/web/src/app/(signing)/sign/[token]/form.tsx index a7200bffb..9ba881cc0 100644 --- a/apps/web/src/app/(signing)/sign/[token]/form.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/form.tsx @@ -25,6 +25,8 @@ import { } from '@documenso/ui/primitives/select'; import { SignaturePad } from '@documenso/ui/primitives/signature-pad'; +import { DATE_FORMATS } from '~/helpers/constants'; + import { useRequiredSigningContext } from './provider'; export type SigningFormProps = { @@ -124,8 +126,11 @@ export const SigningForm = ({ document, recipient, fields }: SigningFormProps) = - YYYY-MM-DD - DD/MM/YYYY + {DATE_FORMATS.map((format) => ( + + {format.label} + + ))} diff --git a/apps/web/src/helpers/constants.ts b/apps/web/src/helpers/constants.ts new file mode 100644 index 000000000..fbbc9b35a --- /dev/null +++ b/apps/web/src/helpers/constants.ts @@ -0,0 +1,17 @@ +export const DATE_FORMATS = [ + { + key: 'YYYYMMDD', + label: 'YYYY-MM-DD', + value: 'yyyy-MM-dd hh:mm a', + }, + { + key: 'DDMMYYYY', + label: 'DD/MM/YYYY', + value: 'dd/MM/yyyy hh:mm a', + }, + { + key: 'MMDDYYYY', + label: 'MM/DD/YYYY', + value: 'MM/dd/yyyy hh:mm a', + }, +];