Fix selecting active tab by date.