我后台想做一个功能需要时间控件,但是时间控件只能精确到天,我希望有小时分钟的。
我知道代码是这里,我看了也没有小时分钟
(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate,
v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true");
g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap();
f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i";
_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c=
f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this,
b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='<div class="'+l+'" '+(u?'role="'+c[_type]+'" ':"");u&&z.each(function(){h+=
'aria-labelledby="';this.id?h+=this.id:(this.id=y,h+=y);h+='"'});h=a.wrap(h+"/>")[_callback]("ifCreated").parent().append(e.insert);d=f('<ins class="'+C+'"/>').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return;
A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d=
b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);
// Date input
DateInput = (function($) { // Localise the $ function
DateInput.DEFAULT_OPTS = {
month_names: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
short_month_names: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"],
short_day_names: ["一", "二", "三", "四", "五", "六", "日"],
start_of_week: 0
};
function DateInput(e,t){typeof t!="object"&&(t={}),$.extend(this,DateInput.DEFAULT_OPTS,t),this.input=$(e),this.bindMethodsToObj("show","hide","hideIfClickOutside","keydownHandler","selectDate"),this.build(),this.selectDate(),this.hide()}DateInput.prototype={build:function(){var e=$('<p class="month_nav"><span class="buttonx prev" title="[Page-Up]">«</span> <span class="month_name"></span> <span class="buttonx next" title="[Page-Down]">»</span></p>');this.monthNameSpan=$(".month_name",e),$(".prev",e).click(this.bindToObj(function(){this.moveMonthBy(-1)})),$(".next",e).click(this.bindToObj(function(){this.moveMonthBy(1)}));var t=$('<p class="year_nav"><span class="buttonx prev" title="[Ctrl+Page-Up]">«</span> <span class="year_name"></span> <span class="buttonx next" title="[Ctrl+Page-Down]">»</span></p>');this.yearNameSpan=$(".year_name",t),$(".prev",t).click(this.bindToObj(function(){this.moveMonthBy(-12)})),$(".next",t).click(this.bindToObj(function(){this.moveMonthBy(12)}));var n=$('<div class="nav"></div>').append(e,t),r="<table><thead><tr>";$(this.adjustDays(this.short_day_names)).each(function(){r+="<th>"+this+"</th>"}),r+="</tr></thead><tbody></tbody></table>",this.dateSelector=this.rootLayers=$('<div class="date_selector"></div>').append(n,r).insertAfter(this.input),/MSIE 6/.test(navigator.userAgent)&&(this.ieframe=$('<iframe class="date_selector_ieframe" frameborder="0" src="#"></iframe>').insertBefore(this.dateSelector),this.rootLayers=this.rootLayers.add(this.ieframe),$(".buttonx",n).mouseover(function(){$(this).addClass("hover")}),$(".buttonx",n).mouseout(function(){$(this).removeClass("hover")})),this.tbody=$("tbody",this.dateSelector),this.input.change(this.bindToObj(function(){this.selectDate()})),this.selectDate()},selectMonth:function(e){var t=new Date(e.getFullYear(),e.getMonth(),1);if(!this.currentMonth||this.currentMonth.getFullYear()!=t.getFullYear()||this.currentMonth.getMonth()!=t.getMonth()){this.currentMonth=t;var n=this.rangeStart(e),r=this.rangeEnd(e),i=this.daysBetween(n,r),s="";for(var o=0;o<=i;o++){var u=new Date(n.getFullYear(),n.getMonth(),n.getDate()+o,12,0);this.isFirstDayOfWeek(u)&&(s+="<tr>"),u.getMonth()==e.getMonth()?s+='<td class="selectable_day" date="'+this.dateToString(u)+'">'+u.getDate()+"</td>":s+='<td class="unselected_month" date="'+this.dateToString(u)+'">'+u.getDate()+"</td>",this.isLastDayOfWeek(u)&&(s+="</tr>")}this.tbody.empty().append(s),this.monthNameSpan.empty().append(this.monthName(e)),this.yearNameSpan.empty().append(this.currentMonth.getFullYear()),$(".selectable_day",this.tbody).click(this.bindToObj(function(e){this.changeInput($(e.target).attr("date"))})),$("td[date='"+this.dateToString(new Date)+"']",this.tbody).addClass("today"),$("td.selectable_day",this.tbody).mouseover(function(){$(this).addClass("hover")}),$("td.selectable_day",this.tbody).mouseout(function(){$(this).removeClass("hover")})}$(".selected",this.tbody).removeClass("selected"),$('td[date="'+this.selectedDateString+'"]',this.tbody).addClass("selected")},selectDate:function(e){typeof e=="undefined"&&(e=this.stringToDate(this.input.val())),e||(e=new Date),this.selectedDate=e,this.selectedDateString=this.dateToString(this.selectedDate),this.selectMonth(this.selectedDate)},changeInput:function(e){this.input.val(e).change(),this.hide()},show:function(){this.rootLayers.css("display","block"),$([window,document.body]).click(this.hideIfClickOutside),this.input.unbind("focus",this.show),$(document.body).keydown(this.keydownHandler),this.setPosition()},hide:function(){this.rootLayers.css("display","none"),$([window,document.body]).unbind("click",this.hideIfClickOutside),this.input.focus(this.show),$(document.body).unbind("keydown",this.keydownHandler)},hideIfClickOutside:function(e){e.target!=this.input[0]&&!this.insideSelector(e)&&this.hide()},insideSelector:function(e){var t=$(e.target);if(t.closest(".date_selector").length==1)return!0},keydownHandler:function(e){switch(e.keyCode){case 9:case 27:this.hide();return;case 13:this.changeInput(this.selectedDateString);break;case 33:this.moveDateMonthBy(e.ctrlKey?-12:-1);break;case 34:this.moveDateMonthBy(e.ctrlKey?12:1);break;case 38:this.moveDateBy(-7);break;case 40:this.moveDateBy(7);break;case 37:this.moveDateBy(-1);break;case 39:this.moveDateBy(1);break;default:return}e.preventDefault()},stringToDate:function(e){var t;return(t=e.match(/^(\d{1,2}) ([^\s]+) (\d{4,4})$/))?new Date(t[3],this.shortMonthNum(t[2]),t[1],12,0):null},dateToString:function(e){var t=(e.getMonth()+1).toString(),n=e.getDate().toString();return t.length==1&&(t="0"+t),n.length==1&&(n="0"+n),e.getFullYear()+"-"+t+"-"+n},setPosition:function(){var e=this.input.offset();this.rootLayers.css({top:this.input.outerHeight()}),this.ieframe&&this.ieframe.css({width:this.dateSelector.outerWidth(),height:this.dateSelector.outerHeight()})},moveDateBy:function(e){var t=new Date(this.selectedDate.getFullYear(),this.selectedDate.getMonth(),this.selectedDate.getDate()+e);this.selectDate(t)},moveDateMonthBy:function(e){var t=new Date(this.selectedDate.getFullYear(),this.selectedDate.getMonth()+e,this.selectedDate.getDate());t.getMonth()==this.selectedDate.getMonth()+e+1&&t.setDate(0),this.selectDate(t)},moveMonthBy:function(e){var t=new Date(this.currentMonth.getFullYear(),this.currentMonth.getMonth()+e,this.currentMonth.getDate());this.selectMonth(t)},monthName:function(e){return this.month_names[e.getMonth()]},bindToObj:function(e){var t=this;return function(){return e.apply(t,arguments)}},bindMethodsToObj:function(){for(var e=0;e<arguments.length;e++)this[arguments[e]]=this.bindToObj(this[arguments[e]])},indexFor:function(e,t){for(var n=0;n<e.length;n++)if(t==e[n])return n},monthNum:function(e){return this.indexFor(this.month_names,e)},shortMonthNum:function(e){return this.indexFor(this.short_month_names,e)},shortDayNum:function(e){return this.indexFor(this.short_day_names,e)},daysBetween:function(e,t){return e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),t=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),(t-e)/864e5},changeDayTo:function(e,t,n){var r=n*(Math.abs(t.getDay()-e-n*7)%7);return new Date(t.getFullYear(),t.getMonth(),t.getDate()+r)},rangeStart:function(e){return this.changeDayTo(this.start_of_week,new Date(e.getFullYear(),e.getMonth()),-1)},rangeEnd:function(e){return this.changeDayTo((this.start_of_week-1)%7,new Date(e.getFullYear(),e.getMonth()+1,0),1)},isFirstDayOfWeek:function(e){return e.getDay()==this.start_of_week},isLastDayOfWeek:function(e){return e.getDay()==(this.start_of_week-1)%7},adjustDays:function(e){var t=[];for(var n=0;n<e.length;n++)t[n]=e[(n+this.start_of_week)%7];return t}},$.fn.date_input=function(e){return this.each(function(){new DateInput(this,e)})},$.date_input={initialize:function(e){$("input.date_input").date_input(e)}}
return DateInput;
})(jQuery); // End localisation of the $ function