clockpicker

How to auto format clockpicker?

北战南征 提交于 2019-12-12 02:56:47
问题 I am using clockpicker(https://github.com/weareoutman/clockpicker) and I want to auto format time when type input field. Here is the clockpicker code: $('.container').each(function(){ var clockpicker = $(this).find('input').clockpicker({ autoclose: true, twelvehour:true, afterDone: function() { clockpicker.val(clockpicker.val().slice(0,-2)+' '+clockpicker.val().slice(-2)); } }); This is the jsfiddle for demo: http://jsfiddle.net/1e71occs/4/ For example jquery time picker provide an option to