diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 000000000..714a80b40
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,13 @@
+module.exports = {
+ extends: [require.resolve('@umijs/fabric/dist/eslint')],
+ rules: {
+ 'default-case': 0,
+ 'react/sort-comp': 0,
+ 'jsx-a11y/no-noninteractive-tabindex': 0,
+ 'jsx-a11y/interactive-supports-focus': 0,
+ 'react/no-array-index-key': 0,
+ 'react/jsx-boolean-value': 0,
+ 'jsx-a11y/anchor-has-content': 0,
+ 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
+ },
+};
diff --git a/.fatherrc.js b/.fatherrc.js
new file mode 100644
index 000000000..767a2abfe
--- /dev/null
+++ b/.fatherrc.js
@@ -0,0 +1,8 @@
+export default {
+ cjs: 'babel',
+ esm: { type: 'babel', importLibToEs: true },
+ preCommit: {
+ eslint: true,
+ prettier: true,
+ },
+};
diff --git a/.gitignore b/.gitignore
index 04f78bff4..8d13dccbe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.storybook
*.iml
*.log
.idea/
@@ -27,4 +28,6 @@ lib
es
coverage
yarn.lock
-.vscode
\ No newline at end of file
+.vscode
+package-lock.json
+.doc
diff --git a/.travis.yml b/.travis.yml
index cc7daab5d..7aff03e0c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ notifications:
- hust2012jiangkai@gmail.com
node_js:
-- 6.9.1
+- 10
before_install:
- |
diff --git a/HISTORY.md b/HISTORY.md
index 6ac5a72ae..d9ba8dc31 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,5 +1,42 @@
# History
-----
+
+---
+
+## 9.15.0 / 2019-05-26
+
+- Support Malay locales
+
+## 9.15.0 / 2019-06-06
+
+- Add numeric keyboard support
+
+## 9.14.0 / 2019-05-24
+
+- Support Latvian locales
+
+## 9.13.0 / 2019-04-02
+
+- Support close onBlur
+
+## 9.12.0 / 2019-03-16
+
+- RangerPicker support null as start or end
+
+## 9.11.0 / 2019-03-14
+
+- RangerPicker can select same month
+
+## 9.10.0 / 2019-01-02
+
+- add `focusablePanel` prop.
+
+## 9.9.0 / 2018-12-23
+
+- `renderFooter(mode)` support all modes.
+
+## 9.8.0 / 2018-11-30
+
+- DateInput support multiple date format
## 9.7.0 / 2018-08-07
@@ -22,9 +59,11 @@
- React 16 support
## 9.1.0 / 2017-07-27
+
- Support control panel [#284](https://github.com/react-component/calendar/pull/284)
## 9.0.0 / 2017-07-27
+
- Replace react string refs with function way [#282](https://github.com/react-component/calendar/pull/282)
## 8.4.0 / 2017-05-31
@@ -202,8 +241,7 @@ upgrade to react 0.13 and es6
## 2.0.0 / 2015-03-04
-`new` [#15](https://github.com/react-component/calendar/issues/15) support defaultValue
-`improved` upgrade gregorian-calendar and gregorian-calendar-format to 3.x
+`new` [#15](https://github.com/react-component/calendar/issues/15) support defaultValue `improved` upgrade gregorian-calendar and gregorian-calendar-format to 3.x
## 1.5.0 / 2015-01-22
@@ -211,18 +249,18 @@ upgrade to react 0.13 and es6
## 1.4.0 / 2015-01-05
-`new` [#12](https://github.com/react-component/calendar/issues/12) support time select ([@yiminghe](https://github.com/yiminghe))
+`new` [#12](https://github.com/react-component/calendar/issues/12) support time select ([@yiminghe](https://github.com/yiminghe))
-`new` [#11](https://github.com/react-component/calendar/issues/11) support prefixCls ([@yiminghe](https://github.com/yiminghe))
+`new` [#11](https://github.com/react-component/calendar/issues/11) support prefixCls ([@yiminghe](https://github.com/yiminghe))
-`new` [#10](https://github.com/react-component/calendar/issues/10) support nextMonth previousMonth in calendar panel ([@yiminghe](https://github.com/yiminghe))
+`new` [#10](https://github.com/react-component/calendar/issues/10) support nextMonth previousMonth in calendar panel ([@yiminghe](https://github.com/yiminghe))
## 1.3.0 / 2014-12-30
-`new` [#9](https://github.com/react-component/calendar/issues/9) support className prop ([@yiminghe](https://github.com/yiminghe))
+`new` [#9](https://github.com/react-component/calendar/issues/9) support className prop ([@yiminghe](https://github.com/yiminghe))
-`new` [#8](https://github.com/react-component/calendar/issues/8) support orient prop ([@yiminghe](https://github.com/yiminghe))
+`new` [#8](https://github.com/react-component/calendar/issues/8) support orient prop ([@yiminghe](https://github.com/yiminghe))
## 1.2.4 / 2014-12-26
-`new` [#7](https://github.com/react-component/calendar/issues/7) release 1.2.4 ([@yiminghe](https://github.com/yiminghe))
+`new` [#7](https://github.com/react-component/calendar/issues/7) release 1.2.4 ([@yiminghe](https://github.com/yiminghe))
diff --git a/README.md b/README.md
index 8febbe8b1..ca0975b1d 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,10 @@
# rc-calendar
----
+
+[Deprecated] `rc-calendar` is deprecated. Please use `rc-picker` instead.
React Calendar
-[![NPM version][npm-image]][npm-url]
-[![build status][travis-image]][travis-url]
-[![Test coverage][codecov-image]][codecov-url]
-[![gemnasium deps][gemnasium-image]][gemnasium-url]
-[![npm download][download-image]][download-url]
-[![Code Quality: Javascript][lgtm-badge]][lgtm-badge-url]
-[![Total alerts][lgtm-alerts]][lgtm-alerts-url]
+[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![gemnasium deps][gemnasium-image]][gemnasium-url] [![npm download][download-image]][download-url] [![Code Quality: Javascript][lgtm-badge]][lgtm-badge-url] [![Total alerts][lgtm-alerts]][lgtm-alerts-url]
[npm-image]: http://img.shields.io/npm/v/rc-calendar.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-calendar
@@ -40,21 +35,21 @@ React Calendar
## Feature
-* support ie9,ie9+,chrome,firefox,safari
-* support date, month, year, decade select panel
-* support week number
-* support en_US and zh_CN locale(UI), use moment.utcOffset to set timezone
-* support aria and keyboard accessibility
+- support ie9,ie9+,chrome,firefox,safari
+- support date, month, year, decade select panel
+- support week number
+- support en_US and zh_CN locale(UI), use moment.utcOffset to set timezone
+- support aria and keyboard accessibility
### Keyboard
-* Previous month (PageUp)
-* Next month (PageDown)
-* tab into hour input: Last hour(Up), Next hour(Down)
-* tab into hour input: Last minute(Up), Next minute(Down)
-* tab into hour input: Last second(Up), Next second(Down)
-* Last year (Control + left)
-* Next year (Control + right)
+- Previous month (PageUp)
+- Next month (PageDown)
+- tab into hour input: Last hour(Up), Next hour(Down)
+- tab into hour input: Last minute(Up), Next minute(Down)
+- tab into hour input: Last second(Up), Next second(Down)
+- Last year (Control + left)
+- Next year (Control + right)
## install
@@ -130,7 +125,7 @@ http://react-component.github.io/calendar/examples/index.html
| renderFooter |
- () => React.Node |
+ (mode) => React.Node |
|
extra footer |
@@ -154,9 +149,10 @@ http://react-component.github.io/calendar/examples/index.html
| format |
- String |
+ String | String[] |
depends on whether you set timePicker and your locale |
- use to format/parse date(without time) value to/from input |
+ use to format/parse date(without time) value to/from input.
+ When an array is provided, all values are used for parsing and first value for display. |
| disabledDate |
@@ -218,6 +214,12 @@ http://react-component.github.io/calendar/examples/index.html
|
called when a date is changed inside calendar (next year/next month/keyboard) |
+
+ | onOk |
+ Function(date: moment) |
+ |
+ called when ok button is pressed, only if it's visible |
+
| dateInputPlaceholder |
String |
@@ -242,10 +244,15 @@ http://react-component.github.io/calendar/examples/index.html
|
specific the clear icon. |
+
+ | inputMode |
+ string |
+ text |
+ Change the keyboard in mobile device |
+
-
### rc-calendar/lib/RangeCalendar props
@@ -372,6 +379,12 @@ http://react-component.github.io/calendar/examples/index.html
|
called when a date range is changed inside calendar (next year/next month/keyboard) |
+
+ | onOk |
+ Function(date: moment) |
+ |
+ called when ok button is pressed, only if it's visible |
+
| dateInputPlaceholder |
String[] |
@@ -495,12 +508,6 @@ http://react-component.github.io/calendar/examples/index.html
|
Custom month cell render method |
-
- | dateCellRender |
- function |
- |
- Custom date cell render method |
-
| monthCellContentRender |
function |
@@ -718,7 +725,6 @@ http://react-component.github.io/calendar/examples/index.html
```
npm test
-npm run chrome-test
```
## Coverage
diff --git a/assets/index/DecadePanel.less b/assets/index/DecadePanel.less
index 97ac157ce..f83c591d0 100644
--- a/assets/index/DecadePanel.less
+++ b/assets/index/DecadePanel.less
@@ -7,6 +7,8 @@
z-index: 10;
position: absolute;
outline: none;
+ display: flex;
+ flex-direction: column;
}
.@{prefixClass}-decade-panel-hidden {
@@ -62,10 +64,13 @@
}
.@{prefixClass}-decade-panel-body {
+ flex: 1;
padding: 9px 10px 10px;
- position: absolute;
- bottom: 0;
- top: 34px;
+}
+
+.@{prefixClass}-decade-panel-footer {
+ border-top: 1px solid #ccc;
+ line-height: 38px;
}
.@{prefixClass}-decade-panel-table {
diff --git a/assets/index/MonthPanel.less b/assets/index/MonthPanel.less
index b65f4666a..1b35f0e6b 100644
--- a/assets/index/MonthPanel.less
+++ b/assets/index/MonthPanel.less
@@ -7,6 +7,12 @@
z-index: 10;
position: absolute;
outline: none;
+
+ > div {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ }
}
.@{prefixClass}-month-panel-hidden {
@@ -71,10 +77,13 @@
}
.@{prefixClass}-month-panel-body {
+ flex: 1;
padding: 9px 10px 10px;
- position: absolute;
- top: 34px;
- bottom: 0;
+}
+
+.@{prefixClass}-month-panel-footer {
+ border-top: 1px solid #ccc;
+ line-height: 38px;
}
.@{prefixClass}-month-panel-table {
diff --git a/assets/index/YearPanel.less b/assets/index/YearPanel.less
index f629d2e9f..6b31dc8ec 100644
--- a/assets/index/YearPanel.less
+++ b/assets/index/YearPanel.less
@@ -7,6 +7,12 @@
z-index: 10;
position: absolute;
outline: none;
+
+ > div {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ }
}
.@{prefixClass}-year-panel-hidden {
@@ -71,10 +77,13 @@
}
.@{prefixClass}-year-panel-body {
+ flex: 1;
padding: 9px 10px 10px;
- position: absolute;
- bottom: 0;
- top: 34px;
+}
+
+.@{prefixClass}-year-panel-footer {
+ border-top: 1px solid #ccc;
+ line-height: 38px;
}
.@{prefixClass}-year-panel-table {
diff --git a/examples/antd-calendar.html b/examples/antd-calendar.html
deleted file mode 100644
index b3a425249..000000000
--- a/examples/antd-calendar.html
+++ /dev/null
@@ -1 +0,0 @@
-placeholder
\ No newline at end of file
diff --git a/examples/antd-calendar.js b/examples/antd-calendar.js
index 6e9172694..fc2f400bd 100644
--- a/examples/antd-calendar.js
+++ b/examples/antd-calendar.js
@@ -1,22 +1,21 @@
/* eslint react/no-multi-comp:0, no-console:0 */
-import 'rc-calendar/assets/index.less';
+import '../assets/index.less';
import React from 'react';
-import ReactDOM from 'react-dom';
-import PropTypes from 'prop-types';
-import Calendar from 'rc-calendar';
-import DatePicker from 'rc-calendar/src/Picker';
-import zhCN from 'rc-calendar/src/locale/zh_CN';
-import enUS from 'rc-calendar/src/locale/en_US';
-import 'rc-time-picker/assets/index.css';
+import moment from 'moment';
import TimePickerPanel from 'rc-time-picker/lib/Panel';
-import moment from 'moment';
+import Calendar from '../src';
+import DatePicker from '../src/Picker';
+import zhCN from '../src/locale/zh_CN';
+import enUS from '../src/locale/en_US';
+import 'rc-time-picker/assets/index.css';
+
import 'moment/locale/zh-cn';
import 'moment/locale/en-gb';
const format = 'YYYY-MM-DD HH:mm:ss';
-const cn = location.search.indexOf('cn') !== -1;
+const cn = window.location.search.indexOf('cn') !== -1;
const now = moment();
if (cn) {
@@ -29,7 +28,6 @@ function getFormat(time) {
return time ? format : 'YYYY-MM-DD';
}
-
const defaultCalendarValue = now.clone();
defaultCalendarValue.add(-1, 'month');
@@ -37,7 +35,7 @@ const timePickerElement = {
- console.log('DatePicker change: ', (value && value.format(format)));
+ onChange = value => {
+ console.log('DatePicker change: ', value && value.format(format));
this.setState({
value,
});
- }
+ };
- onShowTimeChange = (e) => {
+ onShowTimeChange = e => {
this.setState({
showTime: e.target.checked,
});
- }
+ };
- onShowDateInputChange = (e) => {
+ onShowDateInputChange = e => {
this.setState({
showDateInput: e.target.checked,
});
- }
+ };
+
+ onOpenChange = open => {
+ this.setState({
+ open,
+ });
+ };
+
+ onFocus = () => {
+ if (!this.state.open && this.state.isMouseDown) {
+ // focus from a "click" event, let the picker trigger automatically open the calendar
+ this.setState({
+ isMouseDown: false,
+ });
+ } else {
+ // focus not caused by "click" (such as programmatic or via keyboard)
+ this.setState({
+ open: true,
+ });
+ }
+ };
+
+ onMouseDown = () => {
+ this.setState({
+ isMouseDown: true,
+ });
+ };
+
+ getCalendarContainer = () => this.calendarContainerRef.current;
toggleDisabled = () => {
+ const { disabled } = this.state;
this.setState({
- disabled: !this.state.disabled,
+ disabled: !disabled,
});
- }
+ };
render() {
- const state = this.state;
- const calendar = ();
- return (
-
-
-
-
-
-
-
-
-
+ );
+ return (
+
+ );
+ }
+}
+
+const multiFormats = ['DD/MM/YYYY', 'DD/MM/YY', 'DDMMYY', 'D/M/YY'];
+
+class DemoMultiFormat extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ value: now,
+ };
+ }
+
+ onChange = value => {
+ console.log('Calendar change: ', value && value.format(format));
+ this.setState({
+ value,
+ });
+ };
+
+ render() {
+ const { state } = this;
+ return (
+
+
+ Accepts multiple input formats
+
+ {multiFormats.join(', ')}
+
+
+
-
);
+ );
}
}
@@ -196,38 +271,58 @@ function onStandaloneChange(value) {
console.log(value && value.format(format));
}
-
-ReactDOM.render((
-
-
- 'extra footer'}
- />
-
-
-
-
-
-
+export default () => (
+
+
+
+ {mode} extra footer}
+ />
+
+
+
disabled today select time
+
current && current <= moment()}
+ onSelect={onStandaloneSelect}
+ renderFooter={mode => {mode} extra footer}
+ />
+
+
+
+
+
+
+
+
+
+
+
-
-
), document.getElementById('__react-content'));
+);
diff --git a/examples/antd-month-calendar.html b/examples/antd-month-calendar.html
deleted file mode 100644
index b3a425249..000000000
--- a/examples/antd-month-calendar.html
+++ /dev/null
@@ -1 +0,0 @@
-placeholder
\ No newline at end of file
diff --git a/examples/antd-month-calendar.js b/examples/antd-month-calendar.js
index 15ed13f29..a84a0f971 100644
--- a/examples/antd-month-calendar.js
+++ b/examples/antd-month-calendar.js
@@ -1,21 +1,19 @@
/* eslint react/no-multi-comp:0, no-console:0 */
-import 'rc-calendar/assets/index.less';
+import '../assets/index.less';
import React from 'react';
-import ReactDOM from 'react-dom';
-import PropTypes from 'prop-types';
-import MonthCalendar from 'rc-calendar/src/MonthCalendar';
-import DatePicker from 'rc-calendar/src/Picker';
+import moment from 'moment';
+import MonthCalendar from '../src/MonthCalendar';
+import DatePicker from '../src/Picker';
-import zhCN from 'rc-calendar/src/locale/zh_CN';
-import enUS from 'rc-calendar/src/locale/en_US';
+import zhCN from '../src/locale/zh_CN';
+import enUS from '../src/locale/en_US';
-import moment from 'moment';
import 'moment/locale/zh-cn';
import 'moment/locale/en-gb';
const format = 'YYYY-MM';
-const cn = location.search.indexOf('cn') !== -1;
+const cn = window.location.search.indexOf('cn') !== -1;
const now = moment();
if (cn) {
@@ -28,100 +26,88 @@ const defaultCalendarValue = now.clone();
defaultCalendarValue.add(-1, 'month');
class Demo extends React.Component {
- static propTypes = {
- defaultValue: PropTypes.object,
- }
-
constructor(props) {
super(props);
this.state = {
- showTime: true,
disabled: false,
value: props.defaultValue,
};
}
- onChange = (value) => {
+ onChange = value => {
console.log(`DatePicker change: ${value && value.format(format)}`);
this.setState({
value,
});
- }
-
- onShowTimeChange = (e) => {
- this.setState({
- showTime: e.target.checked,
- });
- }
+ };
toggleDisabled = () => {
+ const { disabled } = this.state;
this.setState({
- disabled: !this.state.disabled,
+ disabled: !disabled,
});
- }
+ };
render() {
- const state = this.state;
- const calendar = (
);
- return (
-
-
-
-
-
);
+ );
}
}
function onStandaloneSelect(value) {
- console.log('month-calendar select', (value && value.format(format)));
+ console.log('month-calendar select', value && value.format(format));
}
function onStandaloneChange(value) {
- console.log('month-calendar change', (value && value.format(format)));
+ console.log('month-calendar change', value && value.format(format));
}
function disabledDate(value) {
- return value.year() > now.year() ||
- value.year() === now.year() && value.month() > now.month();
+ return value.year() > now.year() || (value.year() === now.year() && value.month() > now.month());
}
function onMonthCellContentRender(value) {
@@ -129,8 +115,8 @@ function onMonthCellContentRender(value) {
return `${value.month() + 1}月`;
}
-ReactDOM.render(
- (
)
- , document.getElementById('__react-content'));
+
+);
diff --git a/examples/antd-range-calendar.html b/examples/antd-range-calendar.html
deleted file mode 100644
index b3a425249..000000000
--- a/examples/antd-range-calendar.html
+++ /dev/null
@@ -1 +0,0 @@
-placeholder
\ No newline at end of file
diff --git a/examples/antd-range-calendar.js b/examples/antd-range-calendar.js
index 717d77a19..ec7e52486 100644
--- a/examples/antd-range-calendar.js
+++ b/examples/antd-range-calendar.js
@@ -1,20 +1,20 @@
/* eslint react/no-multi-comp:0, no-console:0 */
import React from 'react';
-import ReactDOM from 'react-dom';
-import Picker from 'rc-calendar/src/Picker';
-import RangeCalendar from 'rc-calendar/src/RangeCalendar';
-import zhCN from 'rc-calendar/src/locale/zh_CN';
-import enUS from 'rc-calendar/src/locale/en_US';
+import moment from 'moment';
import TimePickerPanel from 'rc-time-picker/lib/Panel';
-import 'rc-calendar/assets/index.less';
+
+import Picker from '../src/Picker';
+import RangeCalendar from '../src/RangeCalendar';
+import zhCN from '../src/locale/zh_CN';
+import enUS from '../src/locale/en_US';
+import '../assets/index.less';
import 'rc-time-picker/assets/index.css';
-import moment from 'moment';
import 'moment/locale/zh-cn';
import 'moment/locale/en-gb';
-const cn = location.search.indexOf('cn') !== -1;
+const cn = window.location.search.indexOf('cn') !== -1;
if (cn) {
moment.locale('zh-cn');
@@ -40,7 +40,7 @@ const timePickerElement = (
function newArray(start, end) {
const result = [];
- for (let i = start; i < end; i++) {
+ for (let i = start; i < end; i += 1) {
result.push(i);
}
return result;
@@ -51,7 +51,7 @@ function disabledDate(current) {
date.hour(0);
date.minute(0);
date.second(0);
- return current.isBefore(date); // can not select days before today
+ return current.isBefore(date); // can not select days before today
}
function disabledTime(time, type) {
@@ -66,7 +66,8 @@ function disabledTime(time, type) {
disabledMinutes(h) {
if (h === 20) {
return newArray(0, 31);
- } else if (h === 23) {
+ }
+ if (h === 23) {
return newArray(30, 60);
}
return [];
@@ -85,7 +86,8 @@ function disabledTime(time, type) {
disabledMinutes(h) {
if (h === 20) {
return newArray(0, 31);
- } else if (h === 23) {
+ }
+ if (h === 23) {
return newArray(30, 60);
}
return [];
@@ -119,19 +121,19 @@ class Demo extends React.Component {
state = {
value: [],
hoverValue: [],
- }
+ };
- onChange = (value) => {
+ onChange = value => {
console.log('onChange', value);
this.setState({ value });
- }
+ };
- onHoverChange = (hoverValue) => {
+ onHoverChange = hoverValue => {
this.setState({ hoverValue });
- }
+ };
render() {
- const state = this.state;
+ const { state } = this;
const calendar = (
);
return (
-
- {
- ({ value }) => {
- return (
-
- );
- }
- }
- );
+
+ {({ value }) => (
+
+
+
+ )}
+
+ );
}
}
-ReactDOM.render(
+export default () => (
calendar
@@ -194,4 +190,5 @@ ReactDOM.render(
-
, document.getElementById('__react-content'));
+
+);
diff --git a/examples/baisc.js b/examples/baisc.js
new file mode 100644
index 000000000..1333b4626
--- /dev/null
+++ b/examples/baisc.js
@@ -0,0 +1,14 @@
+import React from 'react';
+import Calendar from '../src';
+import MonthCalendar from '../src/MonthCalendar';
+
+export default () => (
+ <>
+
{
+ console.log(value);
+ }}
+ />
+ console.log(rest, ca)} />
+ >
+);
diff --git a/examples/control-panel.html b/examples/control-panel.html
deleted file mode 100644
index e69de29bb..000000000
diff --git a/examples/control-panel.js b/examples/control-panel.js
index 0a8ac633f..32e314fac 100644
--- a/examples/control-panel.js
+++ b/examples/control-panel.js
@@ -1,12 +1,10 @@
/* eslint react/no-multi-comp:0, no-console:0, no-unused-vars:0 */
-import 'rc-calendar/assets/index.less';
+import '../assets/index.less';
import React from 'react';
-import ReactDOM from 'react-dom';
-import Calendar from 'rc-calendar/src';
-import RangeCalendar from 'rc-calendar/src/RangeCalendar';
+import Calendar from '../src';
+import RangeCalendar from '../src/RangeCalendar';
-import Select, { Option } from 'rc-select';
-import 'rc-select/assets/index.css';
+import 'rc-select/assets/index.less';
class Demo extends React.Component {
state = {
@@ -15,8 +13,8 @@ class Demo extends React.Component {
rangeEndMode: 'date',
};
- onModeChange = (key) => {
- return function _handleChange(e) {
+ onModeChange = key =>
+ function _handleChange(e) {
let mode;
if (e && e.target) {
mode = e.target.value;
@@ -28,33 +26,27 @@ class Demo extends React.Component {
[key]: mode,
});
}.bind(this);
- }
handlePanelChange = (...args) => {
console.log('on panel change', ...args);
- }
+ };
handleRangePanelChange = (...args) => {
console.log('on range panel change', ...args);
- }
+ };
render() {
return (
controle Calendar panel
-