with UI datepicker i have two buttons to select previous and next month problem
My goal is to have two buttons to select previous and next day. (I tried it with 'm' for months: same defect).
This is my code:
$('#oneDayBack').click(function(){
$('#datePicker').datepicker('setDate', 'c-1d');
alert($('#datePicker').datepicker('getDate'));
});
$('#oneDayFwd').click(function(){
$('#datePicker').datepicker('setDate', 'c+1d');
$('#datePicker').datepicker('refresh');
});
The alert is my debugger. It proves to me that the datePicker does understand that the selected date has been changed, since I get the newly selected value (one day before or after today). But I never get any farther than one day from some old conception of the current date. The refresh method doesn't help there.