File tree Expand file tree Collapse file tree 4 files changed +9
-21
lines changed Expand file tree Collapse file tree 4 files changed +9
-21
lines changed Original file line number Diff line number Diff line change 8
8
"transform" : " react-transform-hmr" ,
9
9
"imports" : [" react" ],
10
10
"locals" : [" module" ]
11
- }, {
12
- "transform" : " react-transform-catch-errors" ,
13
- "imports" : [" react" , " redbox-react" ]
14
11
}]
15
12
}]
16
13
]
Original file line number Diff line number Diff line change @@ -12,10 +12,6 @@ addons:
12
12
- g++-4.8
13
13
rvm :
14
14
- 2.1.7
15
- cache :
16
- directories :
17
- - node_modules
18
- - vendor/bundle
19
15
before_install :
20
16
- npm install -g grunt-cli
21
17
- gem update --system && gem install scss_lint -v 0.44.0
Original file line number Diff line number Diff line change 66
66
"lodash" : " ^4.3.0" ,
67
67
"mocha" : " ^2.2.5" ,
68
68
"node-sass" : " ^3.4.2" ,
69
- "react-addons-test-utils" : " ^0.14 .0" ,
69
+ "react-addons-test-utils" : " ^15.0 .0" ,
70
70
"react-docgen" : " ^2.7.0" ,
71
- "react-dom" : " ^0.14.0" ,
72
- "react-transform-catch-errors" : " ^1.0.0" ,
73
71
"react-transform-hmr" : " ^1.0.1" ,
74
- "redbox-react" : " ^1.2.0" ,
75
72
"sass-loader" : " ^3.1.2" ,
76
73
"sinon" : " ^1.15.4" ,
77
74
"style-loader" : " ^0.13.0" ,
81
78
"webpack-hot-middleware" : " ^2.6.0"
82
79
},
83
80
"peerDependencies" : {
84
- "react" : " ^0.14.0" ,
85
- "react-dom" : " ^0.14.0"
81
+ "react" : " ^0.14.0 || ^15.0.0 " ,
82
+ "react-dom" : " ^0.14.0 || ^15.0.0 "
86
83
},
87
84
"dependencies" : {
88
85
"classnames" : " ^2.2.1" ,
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ var DateInput = React.createClass({
28
28
29
29
getInitialState ( ) {
30
30
return {
31
- maybeDate : this . safeDateFormat ( this . props )
31
+ value : this . safeDateFormat ( this . props )
32
32
}
33
33
} ,
34
34
@@ -37,7 +37,7 @@ var DateInput = React.createClass({
37
37
newProps . locale !== this . props . locale ||
38
38
newProps . dateFormat !== this . props . dateFormat ) {
39
39
this . setState ( {
40
- maybeDate : this . safeDateFormat ( newProps )
40
+ value : this . safeDateFormat ( newProps )
41
41
} )
42
42
}
43
43
} ,
@@ -60,20 +60,18 @@ var DateInput = React.createClass({
60
60
this . props . onChangeDate ( null )
61
61
}
62
62
}
63
- this . setState ( {
64
- maybeDate : value
65
- } )
63
+ this . setState ( { value} )
66
64
} ,
67
65
68
66
safeDateFormat ( props ) {
69
67
return props . date && props . date . clone ( )
70
68
. locale ( props . locale || moment . locale ( ) )
71
- . format ( props . dateFormat )
69
+ . format ( props . dateFormat ) || ''
72
70
} ,
73
71
74
72
handleBlur ( event ) {
75
73
this . setState ( {
76
- maybeDate : this . safeDateFormat ( this . props )
74
+ value : this . safeDateFormat ( this . props )
77
75
} )
78
76
if ( this . props . onBlur ) {
79
77
this . props . onBlur ( event )
@@ -89,7 +87,7 @@ var DateInput = React.createClass({
89
87
ref = 'input'
90
88
type = 'text'
91
89
{ ...this . props }
92
- value = { this . state . maybeDate }
90
+ value = { this . state . value }
93
91
onBlur = { this . handleBlur }
94
92
onChange = { this . handleChange } />
95
93
}
You can’t perform that action at this time.
0 commit comments