Fixing the ui displaying 'undefined nan' when typing dates in Firefox & IE

Addresses issue https://github.com/eternicode/bootstrap-datepicker/issues/691

The issue: In firefox (tested in build 25.0.1) and IE 8/9/10, clicking into the datepicker then typing "12/24/2" results in the datepicker displaying "undefined nan":

![screen shot 2013-12-09 at 8 01 00 pm](https://f.cloud.github.com/assets/209605/1710920/59825904-613f-11e3-964a-6ef61ca13b19.png)

Chrome (31.0.1650.63) and Safari (6.1 (8537.71)) do not have this problem.

Clicking on the "undefined nan" text or either of the left/right arrows results in the browser crashing.

If you do not click anything in the picker when it is is this state, and instead click off the picker (to close it), it results in the input field filling in with "NaN/NaN/NaN"

![screen shot 2013-12-09 at 8 01 20 pm](https://f.cloud.github.com/assets/209605/1710921/598e6bfe-613f-11e3-9a47-d62806ba41d3.png)