js bug on repeat popup cal