From 2af3702b3e311184b48b40bcc0c88d28c65b5930 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 10 Aug 2023 17:19:23 -0500 Subject: [PATCH] clarify behavior --- core/src/components.d.ts | 2 +- core/src/components/datetime/datetime.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 1c066820bd..37cdedbe07 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -915,7 +915,7 @@ export namespace Components { */ "readonly": boolean; /** - * Resets the internal state of the datetime but does not update the value. Passing a valid ISO-8601 string will reset the state of the component to the provided date. If no value is provided, the internal state will be reset to the clamped value of the min, max and today. + * Resets the internal state of the datetime but does not update the value. Passing a valid ISO-8601 string will reset the state of the component to the provided date. If no date string was passed but the value property is set, then the internal state of datetime will be reset to that value. Otherwise, the internal state will be reset to the clamped value of the min, max and today. */ "reset": (startDate?: string) => Promise; /** diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 4783efbd04..d45914d882 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -542,7 +542,9 @@ export class Datetime implements ComponentInterface { /** * Resets the internal state of the datetime but does not update the value. * Passing a valid ISO-8601 string will reset the state of the component to the provided date. - * If no value is provided, the internal state will be reset to the clamped value of the min, max and today. + * If no date string was passed but the value property is set, then the internal state of + * datetime will be reset to that value. Otherwise, the internal state will be reset to the + * clamped value of the min, max and today. */ @Method() async reset(startDate?: string) {