0.0.10 • Published 10 months ago

react-date-picker-mc v0.0.10

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

React Date Picker

A simple and easy to use date picker build with React and dayjs

Static Badge

Features

  • Display a calendar
  • Select date
  • Change month and year quickly with selector

Installation

To install, you can use npm or yarn:

$ npm install react-date-picker-mc
$ yarn add react-date-picker-mc

⚠️ These component needs to receive a dayjs date object
$ npm install daysjs
$ yarn add daysjs

Usage

The component needs two props:

PropsTypesRequiredDefaultDescription
isOpenBoolBoolean that indicates if the calendat tootip should be open or not
setIsOpenfunctionchange the state of isOpen
dateObjectA dayjs date object
setDatefunctionchange the state of date
import { Datepicker } from 'react-date-picker-mc'
import "react-date-picker-mc/dist/style.css"

import dayjs from "dayjs";
import weekday from 'dayjs/plugin/weekday'
dayjs.extend(weekday)

function App() {
    const [date, setDate] = useState(dayjs())
    const [calendarIsOpen, setCalendarIsOpen] = useState(false)
  return (
    <div className="App">
        <Datepicker isOpen={calendarIsOpen} setIsOpen={setCalendarIsOpen} selectedDate={date} setSelectedDate={setDate} />
    </div>
  )
}

export default App

🔗 Links

portfolio linkedin

github

0.0.10

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago