@9softstudio/react-monthpicker 中文文档教程
React Month Picker
Demo
Usage
export default class App extends Component {
constructor(props) {
super(props);
}
handleSelect = (month, year) => {
console.log(month, year);
}
render() {
return (
<MonthPicker onSelect={this.handleSelect} />
);
}
}
Props
propTypes = {
open: PropTypes.bool,
minMonth: PropTypes.number,
minYear: PropTypes.number,
maxMonth: PropTypes.number,
maxYear: PropTypes.number,
monthNames: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)),
hasRange: PropTypes.bool,
selectedDropdownYear: PropTypes.number,
selectedMonth: PropTypes.number,
onSelect: PropTypes.func,
onFormat: PropTypes.func,
isReadonly: PropTypes.bool,
iconElement: PropTypes.any,
enable: PropTypes.bool
}
defaultProps = {
open: false,
onSelect: () => { },
onFormat: (month, year) => {
return `${month < 10 ? '0' + month : month}/${year}`
},
isReadonly: true,
monthNames: [
['Jan', 'Feb', 'Mar'],
['Apr', 'May', 'Jun'],
['Jul', 'Aug', 'Sep'],
['Oct', 'Nov', 'Dec']
],
enable: true
}
License
MIT
React Month Picker
Demo
Usage
export default class App extends Component {
constructor(props) {
super(props);
}
handleSelect = (month, year) => {
console.log(month, year);
}
render() {
return (
<MonthPicker onSelect={this.handleSelect} />
);
}
}
Props
propTypes = {
open: PropTypes.bool,
minMonth: PropTypes.number,
minYear: PropTypes.number,
maxMonth: PropTypes.number,
maxYear: PropTypes.number,
monthNames: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)),
hasRange: PropTypes.bool,
selectedDropdownYear: PropTypes.number,
selectedMonth: PropTypes.number,
onSelect: PropTypes.func,
onFormat: PropTypes.func,
isReadonly: PropTypes.bool,
iconElement: PropTypes.any,
enable: PropTypes.bool
}
defaultProps = {
open: false,
onSelect: () => { },
onFormat: (month, year) => {
return `${month < 10 ? '0' + month : month}/${year}`
},
isReadonly: true,
monthNames: [
['Jan', 'Feb', 'Mar'],
['Apr', 'May', 'Jun'],
['Jul', 'Aug', 'Sep'],
['Oct', 'Nov', 'Dec']
],
enable: true
}
License
MIT
更多
你可能也喜欢
- 317-project 中文文档教程
- @0x/contracts-integrations 中文文档教程
- @0xcert/ethereum-erc20 中文文档教程
- @0y0/eslint-config-react 中文文档教程
- @4a/env 中文文档教程
- @5minds/generator-5minds-typescript 中文文档教程
- @_koi/logs 中文文档教程
- @a15396222371/batman-component-template 中文文档教程
- @aaditya1978/ckeditor5-custom-build 中文文档教程
- @aaronmaturen/monofun-anchor 中文文档教程