-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
withSelectedDate scrolls to maxDate #49
Comments
The fix seems to be to use "selectDate" instead. "withSelectedDate" should perhaps be removed? final Calendar future = Calendar.getInstance();
future.add(Calendar.YEAR, 10);
final Calendar selected = Calendar.getInstance();
// Default to tomorrow
selected.add(Calendar.DAY_OF_YEAR, 1);
if (getArguments().getLong(SELECTED_DATE, -1) > 0) {
// TODO default date
selected.setTimeInMillis(getArguments().getLong(SELECTED_DATE, -1));
}
calendarView.init(Calendar.getInstance().getTime(), future.getTime());
calendarView.selectDate(selected.getTime());
//.withSelectedDate(selected.getTime()); |
edenman
pushed a commit
that referenced
this issue
May 24, 2013
Sorry, the proposed fix isn't correct: you should definitely be using .withSelectedDate. The real fix is in 94631ab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I load the view (in my dialog fragment), the calendar automatically scrolls to the end of the allowed range. I don't want to restrict the date in this case so I selected a 10 year limit. The view scrolls to 2023 upon loading.
However, if you comment out the line "withSelectedDate", the calendar loads fine and does not scroll to maxDate.
Device: Galaxy Nexus, Android 4.2.2
Code:
The text was updated successfully, but these errors were encountered: