rc-calendar
Advanced tools
Comparing version 9.6.2 to 9.7.0
@@ -45,3 +45,4 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
renderFooter: PropTypes.func, | ||
renderSidebar: PropTypes.func | ||
renderSidebar: PropTypes.func, | ||
clearIcon: PropTypes.node | ||
}, | ||
@@ -199,3 +200,4 @@ | ||
timePicker = props.timePicker, | ||
disabledTime = props.disabledTime; | ||
disabledTime = props.disabledTime, | ||
clearIcon = props.clearIcon; | ||
var value = state.value, | ||
@@ -240,3 +242,4 @@ selectedValue = state.selectedValue, | ||
selectedValue: selectedValue, | ||
onChange: this.onDateInputChange | ||
onChange: this.onDateInputChange, | ||
clearIcon: clearIcon | ||
}) : null; | ||
@@ -243,0 +246,0 @@ var children = [props.renderSidebar(), React.createElement( |
@@ -22,3 +22,4 @@ import React from 'react'; | ||
onSelect: PropTypes.func, | ||
selectedValue: PropTypes.object | ||
selectedValue: PropTypes.object, | ||
clearIcon: PropTypes.node | ||
}, | ||
@@ -116,3 +117,4 @@ | ||
prefixCls = props.prefixCls, | ||
placeholder = props.placeholder; | ||
placeholder = props.placeholder, | ||
clearIcon = props.clearIcon; | ||
@@ -135,8 +137,11 @@ var invalidClass = invalid ? prefixCls + '-input-invalid' : ''; | ||
), | ||
props.showClear ? React.createElement('a', { | ||
className: prefixCls + '-clear-btn', | ||
role: 'button', | ||
title: locale.clear, | ||
onClick: this.onClear | ||
}) : null | ||
props.showClear ? React.createElement( | ||
'a', | ||
{ | ||
role: 'button', | ||
title: locale.clear, | ||
onClick: this.onClear | ||
}, | ||
clearIcon || React.createElement('span', { className: prefixCls + '-clear-btn' }) | ||
) : null | ||
); | ||
@@ -143,0 +148,0 @@ } |
@@ -50,2 +50,3 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; | ||
var locale = this.props.locale; | ||
var currentYear = value.year(); | ||
@@ -52,0 +53,0 @@ var startYear = parseInt(currentYear / 100, 10) * 100; |
@@ -67,4 +67,6 @@ import React from 'react'; | ||
var locale = props.locale; | ||
var year = value.year(); | ||
var prefixCls = this.prefixCls; | ||
return React.createElement( | ||
@@ -71,0 +73,0 @@ 'div', |
@@ -30,3 +30,4 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
enableNext: PropTypes.any, | ||
enablePrev: PropTypes.any | ||
enablePrev: PropTypes.any, | ||
clearIcon: PropTypes.node | ||
}, | ||
@@ -51,3 +52,4 @@ render: function render() { | ||
enablePrev = props.enablePrev, | ||
enableNext = props.enableNext; | ||
enableNext = props.enableNext, | ||
clearIcon = props.clearIcon; | ||
@@ -85,3 +87,4 @@ var shouldShowTimePicker = showTimePicker && timePicker; | ||
selectedValue: selectedValue[index], | ||
onChange: onInputSelect | ||
onChange: onInputSelect, | ||
clearIcon: clearIcon | ||
}); | ||
@@ -88,0 +91,0 @@ |
@@ -105,3 +105,4 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
disabledDate: PropTypes.func, | ||
disabledTime: PropTypes.func | ||
disabledTime: PropTypes.func, | ||
clearIcon: PropTypes.node | ||
}, | ||
@@ -644,3 +645,4 @@ | ||
showToday = props.showToday, | ||
type = props.type; | ||
type = props.type, | ||
clearIcon = props.clearIcon; | ||
var hoverValue = state.hoverValue, | ||
@@ -699,8 +701,11 @@ selectedValue = state.selectedValue, | ||
{ className: prefixCls + '-panel' }, | ||
showClear && selectedValue[0] && selectedValue[1] ? React.createElement('a', { | ||
className: prefixCls + '-clear-btn', | ||
role: 'button', | ||
title: locale.clear, | ||
onClick: this.clear | ||
}) : null, | ||
showClear && selectedValue[0] && selectedValue[1] ? React.createElement( | ||
'a', | ||
{ | ||
role: 'button', | ||
title: locale.clear, | ||
onClick: this.clear | ||
}, | ||
clearIcon || React.createElement('span', { className: prefixCls + '-clear-btn' }) | ||
) : null, | ||
React.createElement( | ||
@@ -729,3 +734,4 @@ 'div', | ||
enablePrev: true, | ||
enableNext: !isClosestMonths || this.isMonthYearPanelShow(mode[1]) | ||
enableNext: !isClosestMonths || this.isMonthYearPanelShow(mode[1]), | ||
clearIcon: clearIcon | ||
})), | ||
@@ -754,3 +760,4 @@ React.createElement( | ||
enablePrev: !isClosestMonths || this.isMonthYearPanelShow(mode[0]), | ||
enableNext: true | ||
enableNext: true, | ||
clearIcon: clearIcon | ||
})) | ||
@@ -757,0 +764,0 @@ ), |
@@ -71,2 +71,3 @@ import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; | ||
var locale = props.locale; | ||
var years = this.years(); | ||
@@ -73,0 +74,0 @@ var currentYear = value.year(); |
# History | ||
---- | ||
## 9.7.0 / 2018-08-07 | ||
- Add clearIcon. | ||
## 9.6.0 / 2018-02-08 | ||
@@ -5,0 +9,0 @@ |
@@ -88,3 +88,4 @@ 'use strict'; | ||
renderFooter: _propTypes2['default'].func, | ||
renderSidebar: _propTypes2['default'].func | ||
renderSidebar: _propTypes2['default'].func, | ||
clearIcon: _propTypes2['default'].node | ||
}, | ||
@@ -242,3 +243,4 @@ | ||
timePicker = props.timePicker, | ||
disabledTime = props.disabledTime; | ||
disabledTime = props.disabledTime, | ||
clearIcon = props.clearIcon; | ||
var value = state.value, | ||
@@ -283,3 +285,4 @@ selectedValue = state.selectedValue, | ||
selectedValue: selectedValue, | ||
onChange: this.onDateInputChange | ||
onChange: this.onDateInputChange, | ||
clearIcon: clearIcon | ||
}) : null; | ||
@@ -286,0 +289,0 @@ var children = [props.renderSidebar(), _react2['default'].createElement( |
@@ -42,3 +42,4 @@ 'use strict'; | ||
onSelect: _propTypes2['default'].func, | ||
selectedValue: _propTypes2['default'].object | ||
selectedValue: _propTypes2['default'].object, | ||
clearIcon: _propTypes2['default'].node | ||
}, | ||
@@ -136,3 +137,4 @@ | ||
prefixCls = props.prefixCls, | ||
placeholder = props.placeholder; | ||
placeholder = props.placeholder, | ||
clearIcon = props.clearIcon; | ||
@@ -155,8 +157,11 @@ var invalidClass = invalid ? prefixCls + '-input-invalid' : ''; | ||
), | ||
props.showClear ? _react2['default'].createElement('a', { | ||
className: prefixCls + '-clear-btn', | ||
role: 'button', | ||
title: locale.clear, | ||
onClick: this.onClear | ||
}) : null | ||
props.showClear ? _react2['default'].createElement( | ||
'a', | ||
{ | ||
role: 'button', | ||
title: locale.clear, | ||
onClick: this.onClear | ||
}, | ||
clearIcon || _react2['default'].createElement('span', { className: prefixCls + '-clear-btn' }) | ||
) : null | ||
); | ||
@@ -163,0 +168,0 @@ } |
@@ -75,2 +75,3 @@ 'use strict'; | ||
var locale = this.props.locale; | ||
var currentYear = value.year(); | ||
@@ -77,0 +78,0 @@ var startYear = parseInt(currentYear / 100, 10) * 100; |
@@ -84,4 +84,6 @@ 'use strict'; | ||
var locale = props.locale; | ||
var year = value.year(); | ||
var prefixCls = this.prefixCls; | ||
return _react2['default'].createElement( | ||
@@ -88,0 +90,0 @@ 'div', |
@@ -57,3 +57,4 @@ 'use strict'; | ||
enableNext: _propTypes2['default'].any, | ||
enablePrev: _propTypes2['default'].any | ||
enablePrev: _propTypes2['default'].any, | ||
clearIcon: _propTypes2['default'].node | ||
}, | ||
@@ -78,3 +79,4 @@ render: function render() { | ||
enablePrev = props.enablePrev, | ||
enableNext = props.enableNext; | ||
enableNext = props.enableNext, | ||
clearIcon = props.clearIcon; | ||
@@ -112,3 +114,4 @@ var shouldShowTimePicker = showTimePicker && timePicker; | ||
selectedValue: selectedValue[index], | ||
onChange: onInputSelect | ||
onChange: onInputSelect, | ||
clearIcon: clearIcon | ||
}); | ||
@@ -115,0 +118,0 @@ |
@@ -148,3 +148,4 @@ 'use strict'; | ||
disabledDate: _propTypes2['default'].func, | ||
disabledTime: _propTypes2['default'].func | ||
disabledTime: _propTypes2['default'].func, | ||
clearIcon: _propTypes2['default'].node | ||
}, | ||
@@ -687,3 +688,4 @@ | ||
showToday = props.showToday, | ||
type = props.type; | ||
type = props.type, | ||
clearIcon = props.clearIcon; | ||
var hoverValue = state.hoverValue, | ||
@@ -742,8 +744,11 @@ selectedValue = state.selectedValue, | ||
{ className: prefixCls + '-panel' }, | ||
showClear && selectedValue[0] && selectedValue[1] ? _react2['default'].createElement('a', { | ||
className: prefixCls + '-clear-btn', | ||
role: 'button', | ||
title: locale.clear, | ||
onClick: this.clear | ||
}) : null, | ||
showClear && selectedValue[0] && selectedValue[1] ? _react2['default'].createElement( | ||
'a', | ||
{ | ||
role: 'button', | ||
title: locale.clear, | ||
onClick: this.clear | ||
}, | ||
clearIcon || _react2['default'].createElement('span', { className: prefixCls + '-clear-btn' }) | ||
) : null, | ||
_react2['default'].createElement( | ||
@@ -772,3 +777,4 @@ 'div', | ||
enablePrev: true, | ||
enableNext: !isClosestMonths || this.isMonthYearPanelShow(mode[1]) | ||
enableNext: !isClosestMonths || this.isMonthYearPanelShow(mode[1]), | ||
clearIcon: clearIcon | ||
})), | ||
@@ -797,3 +803,4 @@ _react2['default'].createElement( | ||
enablePrev: !isClosestMonths || this.isMonthYearPanelShow(mode[0]), | ||
enableNext: true | ||
enableNext: true, | ||
clearIcon: clearIcon | ||
})) | ||
@@ -800,0 +807,0 @@ ), |
@@ -95,2 +95,3 @@ 'use strict'; | ||
var locale = props.locale; | ||
var years = this.years(); | ||
@@ -97,0 +98,0 @@ var currentYear = value.year(); |
{ | ||
"name": "rc-calendar", | ||
"version": "9.6.2", | ||
"version": "9.7.0", | ||
"description": "React Calendar", | ||
@@ -65,3 +65,4 @@ "keywords": [ | ||
"\\.jsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js" | ||
} | ||
}, | ||
"testURL": "http://localhost" | ||
}, | ||
@@ -68,0 +69,0 @@ "devDependencies": { |
@@ -233,2 +233,8 @@ # rc-calendar | ||
</tr> | ||
<tr> | ||
<td>clearIcon</td> | ||
<td>ReactNode</td> | ||
<td></td> | ||
<td>specific the clear icon.</td> | ||
</tr> | ||
</tbody> | ||
@@ -412,2 +418,8 @@ </table> | ||
</tr> | ||
<tr> | ||
<td>clearIcon</td> | ||
<td>ReactNode</td> | ||
<td></td> | ||
<td>specific the clear icon.</td> | ||
</tr> | ||
</tbody> | ||
@@ -414,0 +426,0 @@ </table> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1468568
22353
729
2
31