diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 5c7083d8..0ae7aadb 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -459,6 +459,18 @@ if ($('#frequency').val() == "") }); } +/* format time input shortcut */ +$('#start_time').change(function() { + var raw_time = $(this).val(); + if(raw_time.match(/^\d\[0-6]d$/)) { + raw_time = "0"+raw_time; + } + if(raw_time.match(/^[012]\d[0-5]\d$/)) { + raw_time = raw_time.substring(0,2)+":"+raw_time.substring(2,4); + $('#start_time').val(raw_time); + } +}); + /* on mode change */ $('.mode').change(function() { $.get('qso/band_to_freq/' + $('#band').val() + '/' + $('.mode').val(), function(result) {