1.0.4 • Published 2 years ago

react-pick-date-calendar v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

react-date-picker-library

This is a library for react. It is a library created entirely by me to be able to choose the date and time and be able to implement it on your page.

Installation 🔧

yarn add react-pick-date-calendar

or

npm i react-pick-date-calendar

Usage 🔧

import Calendar from 'react-pick-date-calendar'

Example code 🚀

import Calendar from 'pick-date-calendar-react'
import { useState } from 'react'


const App = () => {
  const [date, setDate] = useState({to: undefined, from: undefined})

  
  return (
    <div className='container'>
        <Calendar
          direction={'right'}
          type={'from'}
          disabled={false}
          timestamp={Date.now()}
          onChangeValue={(event: number) => setDate({...date, from: event})}
          isClockEnabled={true}
        />
    </div>
  )
}

export default App

Example image 🚀

Variable types 🔧

VariableTypewhat do
directiontop, bottom, right, leftCalendar position
typefrom, toWhat is the type of calendar
disabledbooleanEnable or disabled input to display calendar
timestampnumberInitiar date
onChangeValue(number) =>function that receives the date
selectedFromnumberIf is type "to" need receive date from for don't allow previous date
backgroundMonthstringColor for background month
svgFileJSX.Elementsvg tag
isClockEnabledbooleanFor enable or disable clock picker
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago