Fix 'this.date is undefined' on keyUp/keyDown and empty input

To reproduce the fixed issue :
 - get a empty input 
 - $("input").datepicker()
 - click on input (picker appears)
 - press keyUp or keyDown
You get on FF :
```
TypeError: this.date is undefined
Line : 964
```