From e75ed0c6b89282cf475e94d6d5ad0fb35803f974 Mon Sep 17 00:00:00 2001 From: MG12 Date: Thu, 19 Nov 2015 11:59:53 +0800 Subject: update placement handle --- src/TimePicker.jsx | 7 +++++-- src/util/placements.js | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index a6ea7a9..98a1754 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx @@ -50,8 +50,11 @@ const Picker = React.createClass({ getInitialState() { this.savePanelRef = refFn.bind(this, 'panelInstance'); - const { open, value } = this.props; - return { open, value }; + const { open, defaultValue } = this.props; + return { + open: open, + value: defaultValue, + }; }, componentWillReceiveProps(nextProps) { diff --git a/src/util/placements.js b/src/util/placements.js index 2574da1..6760286 100644 --- a/src/util/placements.js +++ b/src/util/placements.js @@ -6,25 +6,25 @@ const autoAdjustOverflow = { const targetOffset = [0, 0]; const placements = { - topLeft: { + bottomLeft: { points: ['tl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset, }, - topRight: { + bottomRight: { points: ['tr', 'tr'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset, }, - bottomRight: { + topRight: { points: ['br', 'br'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset, }, - bottomLeft: { + topLeft: { points: ['bl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 3], -- cgit v1.2.3