This isn't due to knockout. This is the default behaviour of the jQuery DatePicker.
When an invalid date is entered, the result of $(element).datepicker('getDate')
is today's date.
See here for solutions to check if the current input of a jQuery DatePicker is valid. Then modify the ko.utils.registerEventHandler
call in your custom-binding like so:
ko.utils.registerEventHandler(element, "change", function () {
var observable = valueAccessor();
var valid;
/* check validity here */
if( valid ) {
observable($(element).datepicker("getDate"));
}
else {
/*
do something other than jQuery's 'getDate',
as it will return today's date
*/
}
});