Fix datepicker input display. #2932, #3047

Add AngularJS 1.3 compatibility - datepicker display issue reported in PR #2932 and Issue #3047.