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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -