slim-calendar
v0.0.1
Published
Slim input date input with optimized keyboard travel and an optional date picker modal
Downloads
2
Maintainers
Readme
slim-datepicker
Flexible react google map with more options of search, pick & select.
Getting Started
yarn add slim-datepicker
or
npm i slim-datepicker
Usage
Basic use:
import React, { useState } from 'react'
import Calendar from 'slim-react-calendar';
const App = () => {
return <Calendar
min="5"
max="30"
onSubmit={date => {
console.log("Submitted", date);
}}
containerStyle="container-class"/>;
}
// Only calendar
const App2 = () => {
return <Calendar
min="5"
max="30"
onlyCalendar
calenderIconHTML={<h1 style={{"color": "#000"}}>Open Calendar</h1>}
onSubmit={date => {
console.log("Submitted", date);
}}
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 | --
Releases
Here Releases
Note: For Contributors
This repo build with create-react-library
Contributors
Here Contributors
License
ISC BharatPe TM