1.0.5 • Published 5 years ago

react-accessible-datepicker v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-accessible-datepicker

An accessible calendar for React that can be used as a date picker

Uses https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html as reference

NPM JavaScript Style Guide

Install

npm install --save react-accessible-datepicker

Usage

import React, { Component } from 'react'

import Calendar from 'react-accessible-datepicker'
import 'react-accessible-datepicker/dist/index.css'

const Example = () => {
  return <Calendar selectedDate='1990-09-11' />
}

export default Example

Props

PropDescriptionTypeDefault
selectedDateThe date selected on initial loadString (YYYY-MM-DD)Defaults to todays date
onDayClickRun additional code on day clickFunction that passes String of YYYY-MM-DD
onNextMonthClickRun code on next month clickFunction that passes String of YYYY-MM-DD
onPreviousMonthClickRun code on prev month clickFunction that passes String of YYYY-MM-DD
onNextYearClickRun additional code on next year clickFunction that passes String of YYYY-MM-DD
onPreviousYearClickRun additional code on prev year clickFunction that passes String of YYYY-MM-DD

License

MIT © cjwiseman11

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago