This repository was archived by the owner on Nov 16, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ DateTimeField = React.createClass({
3030 left : - 9999 ,
3131 'z-index' : '9999 !important'
3232 } ,
33- viewDate : moment ( ) . startOf ( "month" ) ,
34- selectedDate : moment ( ) ,
35- inputValue : moment ( ) . format ( this . props . inputFormat )
33+ viewDate : moment ( this . props . dateTime , this . props . format ) . startOf ( "month" ) ,
34+ selectedDate : moment ( this . props . dateTime , this . props . format ) ,
35+ inputValue : moment ( this . props . dateTime , this . props . format ) . format ( this . props . inputFormat )
3636 } ;
3737 } ,
3838 componentWillReceiveProps : function ( nextProps ) {
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ DateTimeField = React.createClass(
2626 position : ' absolute'
2727 left : - 9999
2828 ' z-index' : ' 9999 !important'
29- viewDate : moment ().startOf (" month" )
30- selectedDate : moment ()
31- inputValue : moment ().format (@props .inputFormat )
29+ viewDate : moment (@props . dateTime , @props . format ).startOf (" month" )
30+ selectedDate : moment (@props . dateTime , @props . format )
31+ inputValue : moment (@props . dateTime , @props . format ).format (@props .inputFormat )
3232
3333 componentWillReceiveProps : (nextProps ) ->
3434 @setState
You can’t perform that action at this time.
0 commit comments