When datepicker allows text input, if an incomplete date format is entered and <enter> key is pressed, datepicker seems to be substituting the current date for whatever had been typed.
I tried overriding this by using an onblur on the text input, and checking for a partial date (I want to accept just a YEAR input in format yy/mm/dd if that is all the user provides). I fill this out to yy-01-01 in the blur. This works when a blur event occurs but when enter key is pressed, the blur apparently doesn't fire and datepicker still overwrites the date.
I think the current behavior is a bug, or at least presents to users in a way that is non-intuitive, but I'd be glad to use a workaround which would either let me intervene before datepicker, or disable the default datepicker behavior of overwriting an incomplete date spec. I've got masks and jquery validator loaded, and am using both on the field in question ( the behavior does not seem to depend on these two, and I replicated the behavior in the jq demo with default date format ).