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