0.6.5 • Published 7 years ago
rax-calendar v0.6.5
Calendar 日历
Calendar selector component
Install
$ npm install rax-calendar --save
Import
import Calendar from 'rax-calendar';
Props
name | type | default | describe |
---|---|---|---|
startDate | String | '' | optional start time |
endDate | String | '' | optional end time |
titleFormat | String | MMMM YYYY | month rendering format |
dateFormat | String | YYYY-MM-DD | return date format |
weekStart | Num | 1 | start the date as a week |
prevButtonText | String | '' | display text for month switch button |
nextButtonText | String | '' | display text for month switch button |
onDateSelect | Function | '' | select a date |
onTouchPrev | Function | '' | last month |
onTouchNext | Function | '' | next month |
Example
// demo
import { createElement, render, Component } from 'rax';
import Calendar from 'rax-calendar';
import View from 'rax-view';
class App extends Component {
state = {
selectedDate: '2017-01-01'
}
render() {
console.log(this.state.selectedDate);
return (
<View>
<Calendar
ref="calendar"
eventDates={['2017-01-02', '2017-01-05', '2017-01-28', '2017-01-30']}
startDate={'2017-01-01'}
endDate={'2017-07-01'}
titleFormat={'YYYY-MM'}
prevButtonText={'last month'}
nextButtonText={'next mourh'}
weekStart={0}
onDateSelect={(date) => this.setState({ selectedDate: date })}
onTouchPrev={() => console.log('Back TOUCH')}
onTouchNext={() => console.log('Forward TOUCH')}
/>
</View>
);
}
}
render(<App />);
0.6.5
7 years ago
0.6.4
7 years ago
0.6.3
7 years ago
0.6.2
7 years ago
0.6.0
7 years ago
0.5.4
7 years ago
0.5.2
7 years ago
0.5.1
7 years ago
0.5.0
8 years ago
0.4.20
8 years ago
0.4.19
8 years ago
0.4.18
8 years ago
0.4.17
8 years ago
0.4.16
8 years ago
0.4.15
8 years ago
0.5.0-beta
8 years ago
0.4.14
8 years ago
0.4.13
8 years ago
0.4.12
8 years ago
0.4.11
8 years ago
0.4.10
8 years ago
0.4.9
8 years ago
0.4.8
8 years ago
0.4.7
8 years ago
0.4.6
8 years ago
0.4.5
8 years ago
0.4.4
8 years ago
0.4.3
8 years ago
0.4.2
8 years ago
0.4.1
8 years ago
0.4.0
8 years ago
0.3.8
8 years ago
0.3.7
8 years ago
0.3.6
8 years ago
0.3.5
8 years ago
0.3.4
8 years ago
0.3.3
8 years ago
0.3.2
8 years ago
0.3.1
8 years ago
0.3.0
8 years ago
0.2.11
8 years ago
0.2.10
8 years ago
0.2.9
8 years ago
0.2.8
8 years ago
0.2.7
8 years ago
0.2.6
8 years ago
0.2.5
8 years ago
0.2.4
8 years ago
0.2.3
8 years ago