changes to onclick logic to fix bug on 5 day display