Convert Date with Angular 4, Jhipster 4.x -
i have property on object, want save date time
public fechaactualizacion?: any,
i initialize this:
this.oportunidad.fechaactualizacion = new date();
but turning service gives me error
copy.fechaactualizacion = this.dateutils.todate(oportunidad.fechaactualizacion);
todate:
function todate(date) { if (date === undefined || date === null) { return null; } var dateparts = date.split(/\d+/); return new date(dateparts[0], dateparts[1] - 1, dateparts[2], dateparts[3], dateparts[4]); };
error:
error typeerror: t.split not function
use zoneddatetime entity.
if don't want time on angular views, have apply date filter.
Comments
Post a Comment