@@ -14,7 +14,7 @@ const commons = require('./commons');
14
14
const UPDATE_SOURCES = commons . UPDATE_SOURCES ;
15
15
const iconDown = require ( '../img/down.png' ) ;
16
16
const iconUp = require ( '../img/up.png' ) ;
17
- const TOP_POSITION = - 65 ;
17
+ const TOP_POSITION = 65 ;
18
18
19
19
/**
20
20
* @description : Calendar context provider component
@@ -45,7 +45,7 @@ class CalendarProvider extends Component {
45
45
this . state = {
46
46
date : this . props . date || XDate ( ) . toString ( 'yyyy-MM-dd' ) ,
47
47
updateSource : UPDATE_SOURCES . CALENDAR_INIT ,
48
- buttonY : new Animated . Value ( - props . buttonTopPosition || TOP_POSITION ) ,
48
+ buttonY : new Animated . Value ( - props . buttonTopPosition || - TOP_POSITION ) ,
49
49
buttonIcon : this . getButtonIcon ( props . date ) ,
50
50
disabled : false ,
51
51
opacity : new Animated . Value ( 1 )
@@ -122,7 +122,7 @@ class CalendarProvider extends Component {
122
122
const isToday = today === date ;
123
123
124
124
Animated . spring ( this . state . buttonY , {
125
- toValue : isToday ? 65 : - this . props . buttonTopPosition || TOP_POSITION ,
125
+ toValue : isToday ? TOP_POSITION : - this . props . buttonTopPosition || - TOP_POSITION ,
126
126
tension : 30 ,
127
127
friction : 8 ,
128
128
useNativeDriver : true
0 commit comments