File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -318,20 +318,23 @@ var Datetime = React.createClass({
318318
319319 openCalendar : function ( ) {
320320 if ( ! this . state . open ) {
321- this . props . onFocus ( ) ;
322- this . setState ( { open : true } ) ;
321+ this . setState ( { open : true } , function ( ) {
322+ this . props . onFocus ( ) ;
323+ } ) ;
323324 }
324325 } ,
325326
326327 closeCalendar : function ( ) {
327- this . setState ( { open : false } ) ;
328- this . props . onBlur ( this . state . selectedDate || this . state . inputValue ) ;
328+ this . setState ( { open : false } , function ( ) {
329+ this . props . onBlur ( this . state . selectedDate || this . state . inputValue ) ;
330+ } ) ;
329331 } ,
330332
331333 handleClickOutside : function ( ) {
332334 if ( this . props . input && this . state . open && ! this . props . open ) {
333- this . setState ( { open : false } ) ;
334- this . props . onBlur ( this . state . selectedDate || this . state . inputValue ) ;
335+ this . setState ( { open : false } , function ( ) {
336+ this . props . onBlur ( this . state . selectedDate || this . state . inputValue ) ;
337+ } ) ;
335338 }
336339 } ,
337340
You can’t perform that action at this time.
0 commit comments