Hi,
I want to add 30 days to date filed which is default when create record.
below code is not working and will you please help me.
methods: {
onEntityInitialized: function() {
this.callParent(arguments);
this.setExpireDate();
},
setExpireDate: function() {
if (!this.get("ExpireDate")) {
var currentDate = this.get("currentDate");
var differ = 30 * this.Terrasoft.DateRate.MILLISECONDS_IN_DAY;
this.set("ExpireDate", new Date(currentDate.getTime() + differ));
}
}
},
Like
methods: {
onEntityInitialized: function() {
this.callParent(arguments);
this.setExpireDate();
},
setExpireDate: function() {
var now = new Date();
var nowNew = new Date(now.setDate(now.getDate() + 30));
this.set("BirthDate", nowNew);
}
},