slim-datepicker
Flexible user friendly datepicker with optional calendar.
Getting Started
yarn add slim-datepicker
or
npm i slim-datepicker
Usage
Basic use:
; const App = { return <SlimDatePicker min="5" max="30" onSubmit= { console; } containerStyle="container-class"/>;} // Only calendarconst App2 = { return <SlimDatePicker min="5" max="30" onlyCalendar calenderIconHTML=<h1 style="color": "#000">Open Calendar</h1> onSubmit= { console; } containerStyle="container-class"/>;}
defaultDate: PropTypes.object, min: PropTypes.string, max: PropTypes.string, onSubmit: PropTypes.func, calendarIcon: PropTypes.string, containerStyle: PropTypes.string, onlyCalendar: PropTypes.bool, calenderIconHTML: PropTypes.node,
Options
Props | Description | Default value |
---|---|---|
defaultDate | Default date | new Date() // Tue Jul 14 2020 19:11:09 GMT+0530 (India Standard Time) |
min | min age (Duration) - Example : 5 (Till 5 years from now), IF (-ve) Ex: -10 then date supports till 2025 (Future date) | -- |
max | max age (Duration) - Example : 30 (Upto 30 years earlier) | -- |
onSubmit | Triggers once date valid & filled / Selected from calendar | |
calendarIcon | Calendar trigger Icon, On click on this calendar modal will open | default icon |
containerStyle | Styling the date picker container | default style |
calenderIconHTML | Just a text or button click can trigger calendar via this | -- |
PREVIEW
Demo Sandbox
Here DemoSandbox
Releases
Here Releases
Note: For Contributors
This repo build with create-react-library
Contributors
Here Contributors
License
ISC BharatPe TM