fix(datetime): reset falls back to value if set

This commit is contained in:
Liam DeBeasi
2023-08-10 17:10:14 -05:00
parent 6f276099fc
commit 82f8ca8dd1
2 changed files with 2 additions and 2 deletions

View File

@@ -819,7 +819,7 @@ export namespace Components {
}
interface IonDatetime {
/**
* Emits the ionCancel event and optionally closes the popover or modal that the datetime was presented in.
* The cancel method performs the following actions: 1. Emits the ionCancel event 2. Resets the internal state of the datetime 3. Closes the parent popover or modal if "closeOverlay" is true.
*/
"cancel": (closeOverlay?: boolean) => Promise<void>;
/**

View File

@@ -546,7 +546,7 @@ export class Datetime implements ComponentInterface {
*/
@Method()
async reset(startDate?: string) {
this.processValue(startDate);
this.processValue(startDate ?? this.value);
}
/**