mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
fix(AmharicDatePicker): conditionally close date picker based on time selection
This commit is contained in:
@@ -279,7 +279,7 @@ export function AmharicDatePicker({
|
||||
formatters={ETH_FORMATTERS}
|
||||
onSelect={(date: Date | undefined) => {
|
||||
onChange?.(date ? formatWireValue(mergeDateTime(selected, date), dateFormat, withTime) : '');
|
||||
close();
|
||||
if (!withTime) close();
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
@@ -292,7 +292,7 @@ export function AmharicDatePicker({
|
||||
captionLayout="dropdown"
|
||||
onSelect={(date: Date | undefined) => {
|
||||
onChange?.(date ? formatWireValue(mergeDateTime(selected, date), dateFormat, withTime) : '');
|
||||
close();
|
||||
if (!withTime) close();
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user