ng-jhipster
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -67,3 +67,3 @@ { | ||
}, | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"scripts": { | ||
@@ -70,0 +70,0 @@ "lint": "tslint --project tslint.json", |
@@ -50,5 +50,9 @@ import { DatePipe } from '@angular/common'; | ||
}; | ||
// TODO Find a better way to have Date fields because NgbDatePicker returns an object (Related to entities) | ||
// TODO Change this method when moving from datetime-local input to NgbDatePicker | ||
DateUtils.prototype.toDate = function (date) { | ||
return date ? new Date(date.year, date.month - 1, date.day) : null; | ||
if (date === undefined) { | ||
return null; | ||
} | ||
var dateParts = date.split(/\D+/); | ||
return new Date(dateParts[0], dateParts[1] - 1, dateParts[2], dateParts[3], dateParts[4]); | ||
}; | ||
@@ -55,0 +59,0 @@ DateUtils.decorators = [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
899646
7763