Transformation: UI date field transformation (#93807)

fix(transformation): ui date field transformation
This commit is contained in:
Ihor Yeromin 2024-09-26 16:12:58 +02:00 committed by GitHub
parent eb8e6c6a9f
commit 2e559bb333
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,22 +172,21 @@ export const ConvertFieldTypeTransformerEditor = ({
<Input value={c.joinWith} placeholder={'JSON'} onChange={onJoinWithChange(idx)} width={9} />
</InlineField>
)}
{c.dateFormat ||
(targetField?.type === FieldType.time && (
<>
<InlineField label="Date format" tooltip="Specify the output format.">
<Input
value={c.dateFormat}
placeholder={'e.g. YYYY-MM-DD'}
onChange={onInputFormat(idx)}
width={24}
/>
</InlineField>
<InlineField label="Set timezone" tooltip="Set the timezone of the date manually">
<Select options={timeZoneOptions} value={c.timezone} onChange={onTzChange(idx)} isClearable />
</InlineField>
</>
))}
{targetField?.type === FieldType.time && (
<>
<InlineField label="Date format" tooltip="Specify the output format.">
<Input
value={c.dateFormat}
placeholder={'e.g. YYYY-MM-DD'}
onChange={onInputFormat(idx)}
width={24}
/>
</InlineField>
<InlineField label="Set timezone" tooltip="Set the timezone of the date manually">
<Select options={timeZoneOptions} value={c.timezone} onChange={onTzChange(idx)} isClearable />
</InlineField>
</>
)}
</>
)}
<Button