fixed the bug reported by Bob when the display area cross the date line