mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-08 04:15:44 +00:00
feat: integrate AmharicDatePicker for date input in ConfigDrivenSection
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
|||||||
type FormSectionConfig,
|
type FormSectionConfig,
|
||||||
type Vessel,
|
type Vessel,
|
||||||
} from '@ema-platform/api';
|
} from '@ema-platform/api';
|
||||||
import { CountrySelect } from '@ema-platform/ui';
|
import { AmharicDatePicker, CountrySelect } from '@ema-platform/ui';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
section: FormSectionConfig;
|
section: FormSectionConfig;
|
||||||
@@ -197,11 +197,16 @@ export function ConfigDrivenSection({
|
|||||||
thousandSeparator={field.type === 'MONEY' ? ',' : undefined}
|
thousandSeparator={field.type === 'MONEY' ? ',' : undefined}
|
||||||
/>
|
/>
|
||||||
) : field.type === 'DATE' ? (
|
) : field.type === 'DATE' ? (
|
||||||
<TextInput
|
// AmharicDatePicker has no `description`/`withAsterisk` props (from
|
||||||
{...common}
|
// `common`) — pass `required` explicitly so the asterisk still shows.
|
||||||
type="date"
|
<AmharicDatePicker
|
||||||
|
label={label}
|
||||||
|
error={error}
|
||||||
|
disabled={common.disabled}
|
||||||
|
required={field.required}
|
||||||
|
dateFormat="date"
|
||||||
value={(value as string) ?? ''}
|
value={(value as string) ?? ''}
|
||||||
onChange={(e) => onChange(field.key, e.currentTarget.value)}
|
onChange={(v) => onChange(field.key, v)}
|
||||||
/>
|
/>
|
||||||
) : field.type === 'TEXTAREA' ? (
|
) : field.type === 'TEXTAREA' ? (
|
||||||
<Textarea
|
<Textarea
|
||||||
|
|||||||
Reference in New Issue
Block a user