# react-micro-calendar

> Simple react calendar and date picker component

Latest version **0.1.7** (published 2023-02-22) · 0 weekly downloads

## Install

```sh
npm install react-micro-calendar
pnpm add react-micro-calendar
yarn add react-micro-calendar
bun add react-micro-calendar
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2023-02-22 |
| First published | 2021-05-24 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Julio Di Nicola |
| Maintainers | jdinicola |
| Keywords | react, components, ui, calendar, datepicker |

## Links

- npm: https://www.npmjs.com/package/react-micro-calendar
- Repository: https://github.com/jdinicola/react-micro-calendar
- Homepage: https://github.com/jdinicola/react-micro-calendar#readme
- Issues: https://github.com/jdinicola/react-micro-calendar/issues
- npm.io page: https://npm.io/package/react-micro-calendar

## Dependencies (1)

- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@mesalvo/react-ui](https://npm.io/package/@mesalvo/react-ui.md) — 1.7K weekly downloads

## Recent versions

- 0.1.7 (latest) — 2023-02-22
- 0.1.6 — 2023-02-22
- 0.1.5 — 2021-09-22
- 0.1.4 — 2021-08-18
- 0.1.3 — 2021-08-18
- 0.1.2 — 2021-05-24
- 0.1.1 — 2021-05-24
- 0.1.0 — 2021-05-24

## README

# react-micro-calendar

Simple react calendar and date picker component

## Getting started

### Installation

`npm install react-micro-calendar`

### Usage
Here's an example of basic usage

``` jsx
import MicroCalendar from 'react-micro-calendar'

const App = () => {
  const handleDate = date => {
    console.log(date)
  }
  
  return (
    <div className="App">
      <MicroCalendar onDateSelected={date => handleDate(date)} />
    </div>
  );
}

export default App;
```

### Options

#### Props

|Name|Description|Default|
|----|----|----|
|locale|dates locale|`"default"`|
|monthDisplayLength|Month length to display|`"long"`|
|weekdays|Array with week days to display |`['L', 'M', 'X', 'J', 'V', 'S', 'D']`|
|prevButton|Prev month button label|`"<"`|
|nextButton|Next month button label|`">"`|
|applySelectionButtonLabel|Apply date selection button label|`"OK"`|
|selectedClassName|Class name for selected day(s)|`"selected"`|
|todayClassName|Class name today|`"today"`|
|pastClassName|Class name for past days|`"past"`|
|futureClassName|Class name for future days|`"future"`|

#### Callback

|Name|Description|Example|
|----|----|----|
|onDateSelected|Function to be fired when date selection is completed|`onDateSelected={date => handleDate(date)}`|

### Styling

The calendar component has no built-in CSS, so it can be styled as you want.

## License

The MIT License.

## Contributing

As this package is in a very basic form, all contributions are welcome 😅

---
_Source: https://npm.io/package/react-micro-calendar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
