If you're using a partial date mask (with 2 digit year), you won't experience this problem.
But with a full date mask (4 digit year), this issue happens because Datepicker parses a date with 2 digit year as a valid date and calls the focus() method of the input, which causes masked input to validate the value against the full mask, determining that it's an incomplete value and clearing it.
To fix this issue, you'll need to manually change the code of JUI Datepicker.
If you're using the minified version of JUI, search for this substring:
else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);
And then remove it from the code.