Bug 37402: (follow-up) Zero pad the hour automatically on blur

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2026-01-30 11:53:47 -05:00 committed by Lucas Gass
parent 5a8a8ffd57
commit c2b7f2ddb2
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 10 additions and 0 deletions

View File

@ -122,6 +122,16 @@
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% INCLUDE 'calendar.inc' %]
<script>
$(document).ready(function () {
$("#starttime").on("blur", function () {
var time = $(this).val();
if (/^\d:\d{2}$/.test(time)) {
$(this).val("0" + time);
}
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]