Package Exports
- pick-datetime-react
- pick-datetime-react/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pick-datetime-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pick-datetime-react
A simple and reusable date-time picker component for React.
Installation
Install via NPM:
npm install pick-datetime-react --saveor by using Yarn:
yarn add pick-datetime-reactExamples
For datepicker:
<Datepicker
label="Booking date"
name="bookingDate"
placeholder="Choose a date"
// minDate={new Date()}
// maxDate={new Date(2022, 1, 26)}
// weekEnds={['Sun', 'Sat']}
onChange={(date) => console.log(date)}
// message={{ value: 'Please select a valid date' }}
/>
For timepicker:
const now = new Date();
<Timepicker
label="Booking time"
name="bookingTime"
placeholder="Choose a time"
// rightAlign
// slotGap={20}
// format="24"
// startFrom={`${now.getHours()}:${now.getMinutes()}`}
onChange={(time) => console.log(time)}
// message={{ value: 'Please select a valid time' }}
/>;
License
Licensed under MIT license, see LICENSE for the full license.