{#if showHours} { if (typeof hours === 'string') { hours = parseInt(hours); } if (hours < 0) { hours = 0; } onChange(); }} onkeypress={onKeyPress} onfocusin={() => { countKeyPress = 0; }} /> : {/if} { if (typeof minutes === 'string') { minutes = parseInt(minutes); } if (showHours && minutes > 59) { minutes = 59; } else if (minutes < 0) { minutes = 0; } minutes = minutes.toString().padStart(showHours ? 2 : 1, '0'); onChange(); }} onkeypress={onKeyPress} onfocusin={() => { countKeyPress = 0; }} /> : { if (typeof seconds === 'string') { seconds = parseInt(seconds); } if (seconds > 59) { seconds = 59; } else if (seconds < 0) { seconds = 0; } seconds = seconds.toString().padStart(2, '0'); onChange(); }} onkeypress={onKeyPress} onfocusin={() => { countKeyPress = 0; }} />