rc-calendar
Advanced tools
Comparing version 9.5.0 to 9.6.0
@@ -166,3 +166,3 @@ import React from 'react'; | ||
focusCalendar: function focusCalendar() { | ||
if (this.state.open && this.calendarInstance !== null) { | ||
if (this.state.open && !!this.calendarInstance) { | ||
this.calendarInstance.focus(); | ||
@@ -180,2 +180,3 @@ } | ||
disabled = props.disabled, | ||
dropdownClassName = props.dropdownClassName, | ||
transitionName = props.transitionName, | ||
@@ -200,3 +201,4 @@ children = props.children; | ||
onPopupVisibleChange: this.onVisibleChange, | ||
prefixCls: prefixCls | ||
prefixCls: prefixCls, | ||
popupClassName: dropdownClassName | ||
}, | ||
@@ -203,0 +205,0 @@ React.cloneElement(children(state, props), { onKeyDown: this.onKeyDown }) |
@@ -51,3 +51,3 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
function generateOptions(length, extraOptionGen) { | ||
var arr = extraOptionGen ? extraOptionGen() : []; | ||
var arr = extraOptionGen ? extraOptionGen().concat() : []; | ||
for (var value = 0; value < length; value++) { | ||
@@ -334,3 +334,3 @@ if (arr.indexOf(value) === -1) { | ||
var userSettingDisabledTime = disabledTime(null, 'end') || {}; | ||
var userSettingDisabledTime = disabledTime(selectedValue, 'end') || {}; | ||
var startValue = selectedValue && selectedValue[0] || value[0].clone(); | ||
@@ -347,2 +347,4 @@ // if startTime and endTime is same day.. | ||
var oldDisabledMinutes = _disabledMinutes ? _disabledMinutes() : []; | ||
var olddisabledSeconds = _disabledSeconds ? _disabledSeconds() : []; | ||
_disabledHours = generateOptions(hours, _disabledHours); | ||
@@ -359,3 +361,3 @@ _disabledMinutes = generateOptions(minutes, _disabledMinutes); | ||
} | ||
return []; | ||
return oldDisabledMinutes; | ||
}, | ||
@@ -366,3 +368,3 @@ disabledSeconds: function disabledSeconds(hour, minute) { | ||
} | ||
return []; | ||
return olddisabledSeconds; | ||
} | ||
@@ -369,0 +371,0 @@ }; |
# History | ||
---- | ||
## 9.6.0 / 2018-02-08 | ||
- Add Picker[dropdownClassName] | ||
## 9.5.0 / 2017-12-26 | ||
@@ -4,0 +9,0 @@ |
@@ -195,3 +195,3 @@ 'use strict'; | ||
focusCalendar: function focusCalendar() { | ||
if (this.state.open && this.calendarInstance !== null) { | ||
if (this.state.open && !!this.calendarInstance) { | ||
this.calendarInstance.focus(); | ||
@@ -209,2 +209,3 @@ } | ||
disabled = props.disabled, | ||
dropdownClassName = props.dropdownClassName, | ||
transitionName = props.transitionName, | ||
@@ -229,3 +230,4 @@ children = props.children; | ||
onPopupVisibleChange: this.onVisibleChange, | ||
prefixCls: prefixCls | ||
prefixCls: prefixCls, | ||
popupClassName: dropdownClassName | ||
}, | ||
@@ -232,0 +234,0 @@ _react2['default'].cloneElement(children(state, props), { onKeyDown: this.onKeyDown }) |
@@ -90,3 +90,3 @@ 'use strict'; | ||
function generateOptions(length, extraOptionGen) { | ||
var arr = extraOptionGen ? extraOptionGen() : []; | ||
var arr = extraOptionGen ? extraOptionGen().concat() : []; | ||
for (var value = 0; value < length; value++) { | ||
@@ -373,3 +373,3 @@ if (arr.indexOf(value) === -1) { | ||
var userSettingDisabledTime = disabledTime(null, 'end') || {}; | ||
var userSettingDisabledTime = disabledTime(selectedValue, 'end') || {}; | ||
var startValue = selectedValue && selectedValue[0] || value[0].clone(); | ||
@@ -386,2 +386,4 @@ // if startTime and endTime is same day.. | ||
var oldDisabledMinutes = _disabledMinutes ? _disabledMinutes() : []; | ||
var olddisabledSeconds = _disabledSeconds ? _disabledSeconds() : []; | ||
_disabledHours = generateOptions(hours, _disabledHours); | ||
@@ -398,3 +400,3 @@ _disabledMinutes = generateOptions(minutes, _disabledMinutes); | ||
} | ||
return []; | ||
return oldDisabledMinutes; | ||
}, | ||
@@ -405,3 +407,3 @@ disabledSeconds: function disabledSeconds(hour, minute) { | ||
} | ||
return []; | ||
return olddisabledSeconds; | ||
} | ||
@@ -408,0 +410,0 @@ }; |
{ | ||
"name": "rc-calendar", | ||
"version": "9.5.0", | ||
"version": "9.6.0", | ||
"description": "React Calendar", | ||
@@ -53,3 +53,3 @@ "keywords": [ | ||
"collectCoverageFrom": [ | ||
"src/*" | ||
"src/**/*.{js,jsx}" | ||
], | ||
@@ -69,6 +69,6 @@ "setupFiles": [ | ||
"bootstrap": "~3.3.2", | ||
"enzyme": "^3.1.0", | ||
"enzyme-adapter-react-16": "^1.0.2", | ||
"enzyme-to-json": "^3.1.4", | ||
"jest": "^21.2.1", | ||
"enzyme": "^3.3.0", | ||
"enzyme-adapter-react-16": "^1.1.1", | ||
"enzyme-to-json": "^3.3.1", | ||
"jest": "^22.1.4", | ||
"mockdate": "^2.0.1", | ||
@@ -75,0 +75,0 @@ "pre-commit": "1.x", |
@@ -204,2 +204,8 @@ # rc-calendar | ||
<tr> | ||
<td>onClear</td> | ||
<td>Function()</td> | ||
<td></td> | ||
<td>called when a date is cleared from calendar</td> | ||
</tr> | ||
<tr> | ||
<td>onChange</td> | ||
@@ -347,2 +353,8 @@ <td>Function(date: moment)</td> | ||
<tr> | ||
<td>onClear</td> | ||
<td>Function()</td> | ||
<td></td> | ||
<td>called when a date range is cleared from calendar</td> | ||
</tr> | ||
<tr> | ||
<td>onChange</td> | ||
@@ -588,2 +600,8 @@ <td>Function(date: moment[])</td> | ||
</tr> | ||
<tr> | ||
<td>dropdownClassName</td> | ||
<td>string</td> | ||
<td></td> | ||
<td>additional className applied to dropdown</td> | ||
</tr> | ||
</tbody> | ||
@@ -590,0 +608,0 @@ </table> |
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
1423862
22124
717