mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(datetime): reset falls back to value if set
This commit is contained in:
2
core/src/components.d.ts
vendored
2
core/src/components.d.ts
vendored
@@ -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>;
|
||||
/**
|
||||
|
||||
@@ -546,7 +546,7 @@ export class Datetime implements ComponentInterface {
|
||||
*/
|
||||
@Method()
|
||||
async reset(startDate?: string) {
|
||||
this.processValue(startDate);
|
||||
this.processValue(startDate ?? this.value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user