Skip to content

Commit

Permalink
Merge pull request ant-design#562 from ant-design/update-timepicker
Browse files Browse the repository at this point in the history
update timepicker component and fix a bug when clear input.
  • Loading branch information
afc163 committed Nov 20, 2015
2 parents 7740e2d + df180f9 commit 2b6b294
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion components/timepicker/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ const AntTimepicker = React.createClass({
},

handleChange(value) {
this.props.onChange(new Date(value.getTime()));
let args = null;
if (value) {
args = new Date(value.getTime());
}
this.props.onChange(args);
},

getLocale() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"rc-switch": "~1.3.1",
"rc-table": "~3.6.1",
"rc-tabs": "~5.5.0",
"rc-time-picker": "~0.6.0",
"rc-time-picker": "~0.7.1",
"rc-tooltip": "~3.2.0",
"rc-tree": "~0.19.0",
"rc-trigger": "~1.0.6",
Expand Down
2 changes: 1 addition & 1 deletion style/components/timepicker/Panel.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.@{timepicker-prefix-cls}-panel {
.@{timepicker-prefix-cls}-panel-inner {
display: inline-block;
position: relative;
outline: none;
Expand Down
2 changes: 1 addition & 1 deletion style/components/timepicker/Picker.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.@{timepicker-prefix-cls}-container {
.@{timepicker-prefix-cls}-panel {
z-index: 1070;
position: absolute;

Expand Down

0 comments on commit 2b6b294

Please sign in to comment.