Fix bug: scroll to today

If the date is too late, the section to scroll will be larger than the
maximum number.