Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

React component that can select an range of months separated by year

License

NotificationsYou must be signed in to change notification settings

viniarruda/react-month-range-picker

Repository files navigation

React component that can select an range of months separated by year

Install in your project

You can find more information innpm

yarn add @viniarruda/react-month-range-pickerornpm i @viniarruda/react-month-range-picker

Demohere

Examples

default

two columns

Run

To run that demo on your own computer:

Clone this repositoryyarn installyarn storybookVisit http://localhost:6006/

Props

PropstypedefaultValueInfo
columns1 or 21Columns to show
initialYearnumber2020The first initialYear
localestringen-USex:en-US
onRangeSelectfunctionrequiredPass an function to get the RangeParams
calendarClassnamestringoptionalPass anclassName to style calendar container
headerClassnamestringoptionalPass anclassName to style calendar header
monthClassnamestringoptionalPass anclassName to style month item

Styling

To control the month styles, you can usemonthClassName="month" and this name will increment to variant month.

Soo, you can control the styles using:

.month_start.month_selected.month_end

onRangeSelect:(params:RangeParams)=>voidtypeRangeParams={startMonth: numberstartYear: numberendMonth: numberendYear:number}

About

React component that can select an range of months separated by year

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp