rns

react-native-slideable-calendar

A react native calendar strip that support swipe!

Showing:

Popularity

Downloads/wk

20

GitHub Stars

83

Maintenance

Last Commit

2yrs ago

Contributors

1

Package

Dependencies

3

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

react-native-slideable-calendar-strip Build Status npm juejin license

Live Calendar Demo.mp4

Feature

  1. Support pull down gesture
  2. Support go today
  3. Support support marked date
  4. Support Chinese lunar
  5. Support current week of this year (W21)
  6. Support both Date and Date string ('2018-01-01') types
  7. Support customized start of week

How to use

Install package:

npm install --save react-native-slideable-calendar-strip
# or
yarn add react-native-slideable-calendar-strip

Import to your app:

import CalendarStrip from 'react-native-slideable-calendar-strip';

Use the component:

<CalendarStrip
  isChinese
  showWeekNumber
  showChineseLunar
  selectedDate={this.state.selectedDate}
  onPressDate={(date) => {
    this.setState({ selectedDate: date });
  }}
  onPressGoToday={(today) => {
    this.setState({ selectedDate: today });
  }}
  onSwipeDown={() => {
    alert('onSwipeDown');
  }}
  markedDate={['2018-05-04', '2018-05-15', '2018-06-04', '2018-05-01']}
  weekStartsOn={1} // 0,1,2,3,4,5,6 for S M T W T F S, defaults to 0
/>

API

API nameDesc
selectedDateThe current selected date, Required.
onPressDatePress date callback, Optional, (date) => {}
onPressGoTodayPress gotoday button callback, Optional, (today) => {}
markedDateMarked highlighted date array, Optional, ['2018-01-01', '2018-02-01']
onSwipeDownSwipe down gesture callback, Optional, () => {}
isChineseShow Chinese Week or not, default false,
showChineseLunarShow Chinese Lunar or not, default false,
showWeekNumberShow week number or not, default false,
weekStartsOnSet start of week, Optional, defaults to 0, 0 1 2 3 4 5 6 for S M T W T F S

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial