miniui datepicker 二次加工

function onshowpopup(){
$(".mini-calendar-timespinner").css({"width":"180px","height":"100px","margin":"10px"});
$(".mini-calendar-views").parent().css({"display":"none"});
$(".mini-calendar-timespinner").find(".mini-buttonedit-border").css({"height":"100px"})

$(".mini-calendar-timespinner").find(".mini-buttonedit-border").find(".mini-buttonedit-button").css({"height":"100px"});
$(".mini-calendar-timespinner").find(".mini-buttonedit-border").find(".mini-buttonedit-input").css({"font-size":"20pt","text-align":"center","padding":"20% 0"});

//debugger;

}

onshowpopup="onshowpopup"

datepicker获取焦点时弹出列表的做法:

onfocus="onfocus"

function onfocus(e){

  this.showPopup();

}

修过time值

function onshowpopup_time() {


if ($(".mini-calendar-footer .mini-buttonedit-input")[0].old_time_onchange == undefined)
$(".mini-calendar-footer .mini-buttonedit-input")[0].old_time_onchange = $(".mini-calendar-footer .mini-buttonedit-input")[0].onchange;
$(".mini-calendar-footer .mini-buttonedit-input")[0].onchange = function (e) {

if (this.value == undefined)
return;

if (this.value.indexOf(":") == -1) {
if (this.value.length == 4) {
this.value = this.value.substring(0, 2) + ":" + this.value.substring(2, 4);
}
if (this.value.length == 3) {
this.value = this.value.substring(0, 1) + ":" + this.value.substring(1, 3);
}
}
this.old_time_onchange();
};

}

原文地址:https://www.cnblogs.com/coolyylu/p/6076144.html