Fixed DatePicker.js so that it works with the phonegap plugin environment correctly