0.0.1 • Published 4 years ago

slim-calendar v0.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

slim-datepicker NPM version Downloads All Contributors

Flexible react google map with more options of search, pick & select.

slim-datepicker

slim-datepicker

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

PropsDescriptionDefault value
defaultDateDefault datenew Date() // Tue Jul 14 2020 19:11:09 GMT+0530 (India Standard Time)
minmin age (Duration) - Example : 5 (Till 5 years from now), IF (-ve) Ex: -10 then date supports till 2025 (Future date)--
maxmax age (Duration) - Example : 30 (Upto 30 years earlier)--
onSubmitTriggers once date valid & filled / Selected from calendar
calendarIconCalendar trigger Icon, On click on this calendar modal will opendefault icon
containerStyleStyling the date picker containerdefault style
calenderIconHTMLJust 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