constant files created

This commit is contained in:
Ollie Halliday
2023-10-17 19:12:45 +01:00
parent 9139f3a3b4
commit 7afe8cfa18
2 changed files with 24 additions and 2 deletions

View File

@ -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) =
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="yyyy-MM-dd hh:mm a">YYYY-MM-DD</SelectItem>
<SelectItem value="dd/MM/yyyy hh:mm a">DD/MM/YYYY</SelectItem>
{DATE_FORMATS.map((format) => (
<SelectItem key={format.key} value={format.value}>
{format.label}
</SelectItem>
))}
</SelectContent>
</Select>
</div>

View File

@ -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',
},
];