The problem is that when I clear the dates (by deleting the textbox values), th
I know it's a bit too late, but here's a simple peace of code that did it for me:
$('#datepicker-input').val('').datepicker("refresh");