fix(datepicker): date formatting when using angular 1.3 fixes #2659

I've put a fix in for this, as suggested by @bcronje. I also had to parse the $viewValue to a date in the $render function.