Make placeholder dates more obvious

This commit is contained in:
James Brunton 2025-09-11 15:21:38 +01:00
parent 860de72aab
commit b0d16cf069
2 changed files with 6 additions and 7 deletions

View File

@ -1129,10 +1129,12 @@
"format": "Format: yyyy/MM/dd HH:mm:ss"
},
"creationDate": {
"label": "Creation Date"
"label": "Creation Date",
"placeholder": "e.g. 2025/01/17 14:30:00"
},
"modificationDate": {
"label": "Modification Date"
"label": "Modification Date",
"placeholder": "e.g. 2025/01/17 14:30:00"
},
"trapped": {
"label": "Trapped Status",

View File

@ -15,9 +15,6 @@ interface ChangeMetadataSettingsProps {
updateCustomMetadata: (id: string, key: string, value: string) => void;
}
// Global date/time fixed at module load time
const currentDateTime = new Date();
const formattedDateTime = `${currentDateTime.getFullYear()}/${String(currentDateTime.getMonth() + 1).padStart(2, '0')}/${String(currentDateTime.getDate()).padStart(2, '0')} ${String(currentDateTime.getHours()).padStart(2, '0')}:${String(currentDateTime.getMinutes()).padStart(2, '0')}:${String(currentDateTime.getSeconds()).padStart(2, '0')}`;
const ChangeMetadataSettings = ({
parameters,
@ -159,7 +156,7 @@ const ChangeMetadataSettings = ({
<TextInput
label={t('changeMetadata.creationDate.label', 'Creation Date')}
placeholder={formattedDateTime}
placeholder={t('changeMetadata.creationDate.placeholder', 'e.g. 2025/01/17 14:30:00')}
value={parameters.creationDate}
onChange={(e) => onParameterChange('creationDate', e.target.value)}
disabled={fieldsDisabled}
@ -167,7 +164,7 @@ const ChangeMetadataSettings = ({
<TextInput
label={t('changeMetadata.modificationDate.label', 'Modification Date')}
placeholder={formattedDateTime}
placeholder={t('changeMetadata.modificationDate.placeholder', 'e.g. 2025/01/17 14:30:00')}
value={parameters.modificationDate}
onChange={(e) => onParameterChange('modificationDate', e.target.value)}
disabled={fieldsDisabled}