Bugfix on ui-date-format

With the following markup :

    <input type="text" ui-date ui-date-format ng-model="aDate">

The following error is raised when copy/pasting some text : `TypeError: Object && value.toISOString has no method
'toISOString'`

This pull request fixes it.

Test included.