mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 17:21:41 +10:00
constant files created
This commit is contained in:
@ -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>
|
||||
|
||||
17
apps/web/src/helpers/constants.ts
Normal file
17
apps/web/src/helpers/constants.ts
Normal 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',
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user