Skip to content

Commit 4bcc01a

Browse files
committed
set button is locked out till thje alame goes
1 parent a6cd0fd commit 4bcc01a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sprint-3/alarmclock/alarmclock.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const timeRemaining = document.getElementById("timeRemaining");
77
function setAlarm() {
88
// gets the value of the input field and stores it in a variable
99
let timeInSeconds = document.getElementById("alarmSet").value;
10+
botton.disabled = true;
1011

1112
let clock = setInterval(() => {
1213
function pad(num) {
@@ -26,6 +27,7 @@ function setAlarm() {
2627
if (timeInSeconds == 0) {
2728
clearInterval(clock);
2829
playAlarm();
30+
botton.disabled = false;
2931
}
3032
timeRemaining.innerHTML =
3133
"time remaining " + formatTimeDisplay(timeInSeconds);

0 commit comments

Comments
 (0)