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:
parent
5a8a8ffd57
commit
c2b7f2ddb2
|
|
@ -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' %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue