diff options
author | MG12 <wuzhao.mail@gmail.com> | 2015-11-19 11:59:53 +0800 |
---|---|---|
committer | MG12 <wuzhao.mail@gmail.com> | 2015-11-19 11:59:53 +0800 |
commit | e75ed0c6b89282cf475e94d6d5ad0fb35803f974 (patch) | |
tree | 2a98153d4d5d7953ec60d5e7a93e42d649cf54bf /src | |
parent | cadce7b210a339bb701f639c4bff65a2157e13de (diff) | |
download | time-picker-e75ed0c6b89282cf475e94d6d5ad0fb35803f974.tar.gz time-picker-e75ed0c6b89282cf475e94d6d5ad0fb35803f974.tar.zst time-picker-e75ed0c6b89282cf475e94d6d5ad0fb35803f974.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/TimePicker.jsx | 7 | ||||
-rw-r--r-- | src/util/placements.js | 8 |
2 files changed, 9 insertions, 6 deletions
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({ | |||
50 | 50 | ||
51 | getInitialState() { | 51 | getInitialState() { |
52 | this.savePanelRef = refFn.bind(this, 'panelInstance'); | 52 | this.savePanelRef = refFn.bind(this, 'panelInstance'); |
53 | const { open, value } = this.props; | 53 | const { open, defaultValue } = this.props; |
54 | return { open, value }; | 54 | return { |
55 | open: open, | ||
56 | value: defaultValue, | ||
57 | }; | ||
55 | }, | 58 | }, |
56 | 59 | ||
57 | componentWillReceiveProps(nextProps) { | 60 | 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 = { | |||
6 | const targetOffset = [0, 0]; | 6 | const targetOffset = [0, 0]; |
7 | 7 | ||
8 | const placements = { | 8 | const placements = { |
9 | topLeft: { | 9 | bottomLeft: { |
10 | points: ['tl', 'tl'], | 10 | points: ['tl', 'tl'], |
11 | overflow: autoAdjustOverflow, | 11 | overflow: autoAdjustOverflow, |
12 | offset: [0, -3], | 12 | offset: [0, -3], |
13 | targetOffset, | 13 | targetOffset, |
14 | }, | 14 | }, |
15 | topRight: { | 15 | bottomRight: { |
16 | points: ['tr', 'tr'], | 16 | points: ['tr', 'tr'], |
17 | overflow: autoAdjustOverflow, | 17 | overflow: autoAdjustOverflow, |
18 | offset: [0, -3], | 18 | offset: [0, -3], |
19 | targetOffset, | 19 | targetOffset, |
20 | }, | 20 | }, |
21 | bottomRight: { | 21 | topRight: { |
22 | points: ['br', 'br'], | 22 | points: ['br', 'br'], |
23 | overflow: autoAdjustOverflow, | 23 | overflow: autoAdjustOverflow, |
24 | offset: [0, 3], | 24 | offset: [0, 3], |
25 | targetOffset, | 25 | targetOffset, |
26 | }, | 26 | }, |
27 | bottomLeft: { | 27 | topLeft: { |
28 | points: ['bl', 'bl'], | 28 | points: ['bl', 'bl'], |
29 | overflow: autoAdjustOverflow, | 29 | overflow: autoAdjustOverflow, |
30 | offset: [0, 3], | 30 | offset: [0, 3], |