Skip to content

Commit 535c811

Browse files
committed
doc: 更新文档
1 parent 176d1f8 commit 535c811

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

README-en_US.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
[![version](https://img.shields.io/npm/v/react-hash-calendar.svg)](https://www.npmjs.com/package/react-hash-calendar)
2+
[![download](https://img.shields.io/npm/dt/react-hash-calendar.svg)](https://www.npmjs.com/package/react-hash-calendar)
3+
![license](https://img.shields.io/badge/license-MIT-blue.svg)
4+
[![author](https://img.shields.io/badge/author-HashTang-orange.svg)](https://www.hxkj.vip)
5+
6+
[简体中文](https://github.com/TangSY/react-hash-calendar/blob/master/README-zh_CN.md) | English
7+
8+
## Using Effects
9+
10+
![calendar.gif](https://www.hxkj.vip/demo/calendar/calendar.gif)
11+
![dot.gif](https://www.hxkj.vip/demo/calendar/dot.gif)
12+
![week.gif](https://www.hxkj.vip/demo/calendar/week.gif)
13+
14+
The same calendar for Vue:[https://github.com/TangSY/vue-hash-calendar](https://github.com/TangSY/vue-hash-calendar)
15+
16+
# react-hash-calendar
17+
18+
- Support gesture sliding operation
19+
- Slide up and down to switch weekly / monthly mode
20+
21+
> [week mode] slide left and right to switch the previous week / next week
22+
23+
> [month mode] slide left and right to switch the previous month / next month
24+
25+
## Install
26+
27+
```
28+
npm i react-hash-calendar
29+
```
30+
31+
## Demo
32+
33+
![demo_qrcode.png](https://www.hxkj.vip/demo/react-calendar/demo.png)
34+
35+
online demo:[https://www.hxkj.vip/demo/react-calendar/](https://www.hxkj.vip/demo/react-calendar/)
36+
37+
- 🎉 can you give me a star? 🎉
38+
39+
### github link:[https://github.com/TangSY/react-hash-calendar](https://github.com/TangSY/react-hash-calendar)
40+
41+
## API
42+
43+
| name | describle | type | default |
44+
| :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------ | :------------: |
45+
| visible | To control the display or hide of calendar components | boolean | false |
46+
| onVisibleChange | params { visible } | (visible: boolean) => void | - |
47+
| scrollChangeDate | Controls whether the selected date is modified when sliding | boolean | true |
48+
| model | What form is the calendar component displayed. Inline: the way to inline. Dialog: pop up mode | string | inline |
49+
| defaultDatetime | -- | Date | now |
50+
| format | The date format returned by the callback event when confirming the date. eg: "YY / mm / DD HH: mm" , "MM DD,YY at hh:mm F" | string | YY/MM/DD hh:mm |
51+
| weekStart | Use the day of the week as the starting week of each week in the calendar. choose: 'sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday' | string | sunday |
52+
| pickerType | Selector Type. choose: 'datetime', 'date', 'time' | string | datetime |
53+
| showTodayButton | -- | boolean | true |
54+
| isShowWeekView | -- | boolean | false |
55+
| isShowAction | -- | boolean | true |
56+
| disabledWeekView | -- | boolean | false |
57+
| disabledDate | Set the disabled status of the date (returned true to disabled) | Function | - |
58+
| disabledScroll | Set the no sliding direction of the calendar. choose: 'left', 'right', 'up', 'down', 'horizontal', 'vertical', true, false] | string | '' |
59+
| markDate | he date to be marked can be grouped according to different colors and mark types (no grouped, the default is blue). eg:[{color: 'red',date: ['2019/02/25']},{color: 'blue',type: 'dot',date: ['2019/01/20']},'2019/03/20'] | Array | [] |
60+
| markType | Mark pattern type. choose: 'dot', 'circle', 'dot+circle' | string | dot |
61+
| minuteStep | -- | number | 1 |
62+
| lang | Language. choose: 'CN', 'EN' | string | CN |
63+
| dateClickCallback | -- | (date: Date \| string) => void | - |
64+
| dateConfirmCallback | -- | (date: Date \| string) => void | - |
65+
| touchStartCallback | -- | (event: React.TouchEvent) => void | - |
66+
| touchMoveCallback | -- | (event: React.TouchEvent) => void | - |
67+
| touchEndCallback | -- | (event: React.TouchEvent) => void | - |
68+
| slideChangeCallback | -- | (direction: string) => void | - |
69+
| weekSlot | Customize week content and style。 | (week: string) => React.ReactNode | - |
70+
| daySlot | Customize date content and style | (date, extendAttr) => React.ReactNode | - |
71+
| todaySlot | Customize today button content and style | () => React.ReactNode | - |
72+
| confirmSlot | Customize dconfirmate button content and style | () => React.ReactNode | - |
73+
| actionSlot | Customize action content and style | () => React.ReactNode | - |
74+
75+
### Other
76+
77+
- If there are other problems or incompatible functions. Can communicate by email 't@tsy6.com', or GitHub submits the issue.
78+
79+
### Sponsor
80+
81+
![pay.jpg](https://www.hxkj.vip/demo/calendar/pay.jpg)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
![license](https://img.shields.io/badge/license-MIT-blue.svg)
44
[![author](https://img.shields.io/badge/author-HashTang-orange.svg)](https://www.hxkj.vip)
55

6+
简体中文 | [English](https://github.com/TangSY/react-hash-calendar/blob/master/README-en_US.md)
7+
68
# 按照惯例,先上效果图
79

810
![calendar.gif](https://www.hxkj.vip/demo/calendar/calendar.gif)
911
![dot.gif](https://www.hxkj.vip/demo/calendar/dot.gif)
1012
![week.gif](https://www.hxkj.vip/demo/calendar/week.gif)
1113

14+
vue 版本同款日历:[https://github.com/TangSY/vue-hash-calendar](https://github.com/TangSY/vue-hash-calendar)
15+
1216
# react-hash-calendar
1317

1418
- 支持手势滑动操作

0 commit comments

Comments
 (0)