|
| 1 | +[](https://www.npmjs.com/package/react-hash-calendar) |
| 2 | +[](https://www.npmjs.com/package/react-hash-calendar) |
| 3 | + |
| 4 | +[](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 | + |
| 11 | + |
| 12 | + |
| 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 | + |
| 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 | + |
0 commit comments