Fix datepicker input display. #2932, #3047

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