ich immer einig Datum fileds von Postgres mit Format wie setzen:Wie recht Datumsformat für editierbare-date
"2000-11-30T14: 00: 00.000Z"
ich kann verwende das nicht in meinem editierbaren Datumsfeld auf der Seite. Etwas wie:
<a href="#" editable-date="employee.brthday"
onbeforesave="updateField($data, 'brthday', employee)">
{{employee.brthday || 'empty' | date:"dd/MM/yyyy" }}
</a>
Dieses Datum (wie oben) angezeigt fein. Aber wenn ich dieses Feld bearbeiten möchten, Datum zurückgesetzt, und ich habe diese Nachricht in der Konsole:
Error: [ngModel:datefmt] Expected `2000-12-05T14:00:00.000Z` to be a date http://errors.angularjs.org/1.3.0/ngModel/datefmt?p0=2000-12-05T14%3A00%3A00.000Z
at http://localhost:8000/bower_components/angular/angular.js:80:12
at Array.<anonymous> (http://localhost:8000/bower_components/angular/angular.js:19453:17)
at Object.ngModelWatch (http://localhost:8000/bower_components/angular/angular.js:20555:36)
at Scope.$digest (http://localhost:8000/bower_components/angular/angular.js:13957:40)
at Scope.$apply (http://localhost:8000/bower_components/angular/angular.js:14227:24)
at HTMLAnchorElement.<anonymous> (http://localhost:8000/bower_components/angular-xeditable/dist/js/xeditable.js:831:21)
at HTMLAnchorElement.jQuery.event.dispatch (http://localhost:8000/bower_components/jquery/dist/jquery.js:4409:9)
at HTMLAnchorElement.elemData.handle (http://localhost:8000/bower_components/jquery/dist/jquery.js:4095:28)
Wenn ich nur Modell aktualisieren, indem Sie das Feld Bearbeitung (Eingabe neuer Termin), Es könnte in Zukunft bearbeiten fein, weil Datum gespeichert wie (Datum obj?):
Mi 6. Dezember 2000 00:00:00 GMT + 1000 (Якутское время (зима))
Wie kann ich mein Eingangsdatum konvertieren, um verständlich für eckiges Format?
Ich habe auch versucht, Eingabe-Datumsformat durch 'neues Datum (Eingabe-Datum-hier) zu ersetzen, aber es funktioniert nicht. Kann das Eingabedatum Format nicht nur von String analysiert werden?
Zusammenfassen: Ich muss das Eingabeformat in Datum obj ODER über pg.js Datumsfelder wie Datumsobjekte konvertieren. Wie kann ich etwas daraus machen?