第33行剝離了額外的標記,以便datepicker插件可以解析插件各種事件的日期。我最近找到了一個適用於我的解決方案,但是我無法讓你的jsFiddle正常工作。我已經評論了一些移動樣式正在做的額外標記。看看我的版本updateDatepicker函數,希望它會有幫助。
function updateDatepicker(){
// $(".ui-datepicker-header", dp).addClass("ui-body-c ui-corner-top").removeClass("ui-corner-all");
$(".ui-datepicker-prev, .ui-datepicker-next", dp).attr("href", "#");
$(".ui-datepicker-prev", dp).buttonMarkup({iconpos: "notext", icon: "arrow-l", shadow: true, corners: true});
$(".ui-datepicker-next", dp).buttonMarkup({iconpos: "notext", icon: "arrow-r", shadow: true, corners: true});
// $(".ui-datepicker-calendar th", dp).addClass("ui-bar-c");
// $(".ui-datepicker-calendar td", dp).addClass("ui-body-c");
// $(".ui-datepicker-calendar a", dp).buttonMarkup({corners: false, shadow: false});
$(".ui-datepicker-calendar a.ui-state-active", dp).addClass("ui-btn-active"); // selected date
$(".ui-datepicker-calendar a.ui-state-highlight", dp).addClass("ui-btn-up-e"); // today"s date
$(".ui-datepicker-calendar .ui-btn", dp).each(function(){
var el = $(this);
// remove extra button markup - necessary for date value to be interpreted correctly
el.html(el.find(".ui-btn-text").text());
});
};
是的!你已經爲我工作了!我已經開始使用[datebox](http://dev.jtsage.com/jQM-DateBox/)插件了,但它沒有被記錄,臃腫且難以實現, m喜歡這個版本,並樂意讓它工作,謝謝你。 – stagl