From 7b6485586d4a24e8c68a9827510b9149b0ec5b47 Mon Sep 17 00:00:00 2001 From: Toby Murray Date: Mon, 4 Dec 2023 15:56:30 -0500 Subject: [PATCH] Adjust example wording "the today's date" is a bit awkward, so update it to just say "today's date". --- website/examples/modifiers-today.tsx | 4 ++-- website/test-integration/examples/modifiers-today.test.tsx | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/website/examples/modifiers-today.tsx b/website/examples/modifiers-today.tsx index b15198b6d5..f4901afc3e 100644 --- a/website/examples/modifiers-today.tsx +++ b/website/examples/modifiers-today.tsx @@ -3,12 +3,12 @@ import React, { useState } from 'react'; import { DayClickEventHandler, DayPicker } from 'react-day-picker'; export default function App() { - const initialFooter =

Try clicking the today’s date.

; + const initialFooter =

Try clicking today’s date.

; const [footer, setFooter] = useState(initialFooter); const handleDayClick: DayClickEventHandler = (day, modifiers) => { if (modifiers.today) { - setFooter(

You clicked the today’s date.

); + setFooter(

You clicked today’s date.

); } else { setFooter(initialFooter); } diff --git a/website/test-integration/examples/modifiers-today.test.tsx b/website/test-integration/examples/modifiers-today.test.tsx index e5ef6c4d8b..77d468c4f5 100644 --- a/website/test-integration/examples/modifiers-today.test.tsx +++ b/website/test-integration/examples/modifiers-today.test.tsx @@ -30,7 +30,7 @@ describe('when rendering a month that contains today', () => { describe('when the today date is clicked', () => { beforeEach(async () => act(() => user.click(getDayButton(today)))); test('should update the footer', () => { - expect(getTableFooter()).toHaveTextContent('You clicked the today’s date'); + expect(getTableFooter()).toHaveTextContent('You clicked today’s date'); }); }); @@ -38,8 +38,6 @@ describe('when another date is clicked', () => { const date = addDays(today, 1); beforeEach(async () => act(() => user.click(getDayButton(date)))); test('should update the footer', () => { - expect(getTableFooter()).toHaveTextContent( - 'Try clicking the today’s date.' - ); + expect(getTableFooter()).toHaveTextContent('Try clicking today’s date.'); }); });