is there a way to change the datepicker's month on swipe? I mean any way to display next and previous month on swipe?
Here is my approach:
Jquery Mobile Swipe:
// 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');
}
And Here is Jquery Mobile datePicker Code:
$(".date-input-inline").datepicker({
onChangeMonthYear: function(year, month, inst) {
$(".ui-datepicker").fadeOut(0);
$(".ui-datepicker").fadeIn("normal");
},
dateFormat: 'yy-mm-dd',
yearRange: currentY + ':' + currentY,
});