Fixed datepicker issue. Rendering mapView after window.onload so all scripts are loaded first