mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 01:32:06 +10:00
constant files created
This commit is contained in:
@ -25,6 +25,8 @@ import {
|
|||||||
} from '@documenso/ui/primitives/select';
|
} from '@documenso/ui/primitives/select';
|
||||||
import { SignaturePad } from '@documenso/ui/primitives/signature-pad';
|
import { SignaturePad } from '@documenso/ui/primitives/signature-pad';
|
||||||
|
|
||||||
|
import { DATE_FORMATS } from '~/helpers/constants';
|
||||||
|
|
||||||
import { useRequiredSigningContext } from './provider';
|
import { useRequiredSigningContext } from './provider';
|
||||||
|
|
||||||
export type SigningFormProps = {
|
export type SigningFormProps = {
|
||||||
@ -124,8 +126,11 @@ export const SigningForm = ({ document, recipient, fields }: SigningFormProps) =
|
|||||||
<SelectValue />
|
<SelectValue />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="yyyy-MM-dd hh:mm a">YYYY-MM-DD</SelectItem>
|
{DATE_FORMATS.map((format) => (
|
||||||
<SelectItem value="dd/MM/yyyy hh:mm a">DD/MM/YYYY</SelectItem>
|
<SelectItem key={format.key} value={format.value}>
|
||||||
|
{format.label}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</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