3
有没有办法在刷卡时更改日期选择器的月份?我的意思是任何方式来显示下一个和上个月刷卡?Jquery Mobile Datepicker在刷卡上更改月份
这里是我的方法:
jQuery Mobile的刷卡:
// Bind the swipeHandler callback function to the swipe event on div.box
$("#main-page").on("swipeleft", swipeLeftHandler).on("swiperight", swipeRightHandler);
function swipeLeftHandler(event){
// $(event.target).addClass("swipe");
console.log('swiped Left');
}
function swipeRightHandler(event){
// $(event.target).addClass("swipe");
console.log('swiped Right');
}
,这里是jQuery Mobile的日期选择器代码:
$(".date-input-inline").datepicker({
onChangeMonthYear: function(year, month, inst) {
$(".ui-datepicker").fadeOut(0);
$(".ui-datepicker").fadeIn("normal");
},
dateFormat: 'yy-mm-dd',
yearRange: currentY + ':' + currentY,
});