{"repo":"Hacker0x01/react-datepicker","free":true,"listed":false,"github":"https://github.com/Hacker0x01/react-datepicker","clone":"git clone https://github.com/Hacker0x01/react-datepicker.git","description":"A simple and reusable datepicker component for React","language":"TypeScript","stars":8383,"topics":["datepicker-component","react","javascript","moment","picker","date-fns","hacktoberfest"],"license":"MIT","category":"ui-components","readme_excerpt":"React Date Picker A simple and reusable Datepicker component for React (Demo) Installation The package can be installed via npm: Or via yarn: 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). Configuration The most basic use of the DatePicker can be described with: You can use onSelect event handler which fires each time some calendar date has been selected onClickOutside handler may be useful to close datepicker in inline mode See here for a full list of props that may be passed to the component. Examples are given on the main website. Working with Examples When using examples from the documentation site, note that they may reference utilities from external libraries. Common imports you might need: Date manipulation (from date-fns ): Utility functions : - For range() function used in custom headers: import range from \"lodash/range\"; - Or implement your own: const range = (start, end, step) = Array.from({ length: (end - start) / step }, ( , i) = start + i step); TypeScr","default_branch":null,"files":null,"tree":[],"storefront":"/r/Hacker0x01","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Hacker0x01/react-datepicker/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}