correct display bug when selecting a date at the left that is posterior to the date at the right