diff --git a/apps/docs/content/components/date-range-picker/error-message-function.ts b/apps/docs/content/components/date-range-picker/error-message-function.ts index 45fd417c89..9e8cb16eab 100644 --- a/apps/docs/content/components/date-range-picker/error-message-function.ts +++ b/apps/docs/content/components/date-range-picker/error-message-function.ts @@ -7,7 +7,6 @@ export default function App() { isInvalid label="Stay duration" variant="bordered" - errorMessage="Please enter your stay duration" errorMessage={(value) => { if (value.isInvalid) { return "Please enter your stay duration"; diff --git a/packages/components/date-input/stories/time-input.stories.tsx b/packages/components/date-input/stories/time-input.stories.tsx index efaab54a38..cdf090c8b1 100644 --- a/packages/components/date-input/stories/time-input.stories.tsx +++ b/packages/components/date-input/stories/time-input.stories.tsx @@ -209,12 +209,11 @@ export const WithErrorMessageFunction = { args: { ...defaultProps, isInvalid: true, - errorMessage: "Please enter a valid time", - }, - errorMessage: (value: ValidationResult) => { - if (value.isInvalid) { - return "Please enter a valid date"; - } + errorMessage: (value: ValidationResult) => { + if (value.isInvalid) { + return "Please enter a valid date"; + } + }, }, };