Skip to content

Commit

Permalink
Merge branch 'pr/105'
Browse files Browse the repository at this point in the history
  • Loading branch information
alamkanak committed May 9, 2015
2 parents de905c3 + 89a126e commit a1ee4e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/src/main/java/com/alamkanak/weekview/WeekView.java
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,10 @@ public void goToDate(Calendar date) {
today.set(Calendar.SECOND, 0);
today.set(Calendar.MILLISECOND, 0);

int dateDifference = (int) ((date.getTimeInMillis() - today.getTimeInMillis()) / (1000 * 60 * 60 * 24));
long dateInMillis = date.getTimeInMillis() + date.getTimeZone().getOffset(date.getTimeInMillis());
long todayInMillis = today.getTimeInMillis() + today.getTimeZone().getOffset(today.getTimeInMillis());
int dateDifference = (int) ((dateInMillis - todayInMillis) / (1000 * 60 * 60 * 24));

mCurrentOrigin.x = - dateDifference * (mWidthPerDay + mColumnGap);
// mStickyScroller.startScroll((int) mCurrentOrigin.x, 0, (int) (-dateDifference*(mWidthPerDay + mColumnGap)-mCurrentOrigin.x), 0);
invalidate();
Expand Down

0 comments on commit a1ee4e8

Please sign in to comment.