From b669900aa7c8cd45a8453840f7d99abc0f1daf28 Mon Sep 17 00:00:00 2001 From: Maksim Beliakov <58391051+maxim-belyakov@users.noreply.github.com> Date: Wed, 1 Jul 2026 13:13:24 +0200 Subject: [PATCH] Update README to correct React dependency mention - Correct `startdate` -> `startDate` in the basic-usage example so the snippet references the state variable it defines (previously threw "startdate is not defined" when copy-pasted). - Replace the outdated "React and PropTypes" install note with "React and react-dom": the package is TypeScript and declares no prop-types peer dependency; react and react-dom are the actual peers. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index def0ed701..16614a3f2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Or via [yarn](https://github.com/yarnpkg/yarn): yarn add react-datepicker ``` -You’ll need to install React and PropTypes separately since those dependencies aren’t included in the package. If you need to use a locale other than the default en-US, you'll also need to import that into your project from date-fns (see Localization section below). Below is a simple example of how to use the Datepicker in a React view. You will also need to require the CSS file from this package (or provide your own). The example below shows how to include the CSS from this package if your build system supports requiring CSS files (Webpack is one that does). +You’ll need to install React and react-dom separately since those dependencies aren’t included in the package. If you need to use a locale other than the default en-US, you'll also need to import that into your project from date-fns (see Localization section below). Below is a simple example of how to use the Datepicker in a React view. You will also need to require the CSS file from this package (or provide your own). The example below shows how to include the CSS from this package if your build system supports requiring CSS files (Webpack is one that does). ```js import React, { useState } from "react"; @@ -45,7 +45,7 @@ const Example = () => { The most basic use of the DatePicker can be described with: ```js - setStartDate(date)} /> + setStartDate(date)} /> ``` You can use `onSelect` event handler which fires each time some calendar date has been selected