When the Javascript starts you first do a attendanceStatus();
to enable/disable based on the hour of the day, and this seems to work alright.
But right below that you immediately override the previous action by enabling/disabling the buttons based on whatever is in sessionStorage.getItem('clockedIn')
.
You would have to combine the timebased and session checks somehow to get the result you desire.