@Input() datatype: string;
@Input() multiSortable: boolean;
+ // Display date and time when datatype = timestamp
+ @Input() datePlusTime: boolean;
+
// Used in conjunction with cellTemplate
@Input() cellContext: any;
@Input() cellTemplate: TemplateRef<any>;
col.isSortable = this.sortable;
col.isMultiSortable = this.multiSortable;
col.datatype = this.datatype;
+ col.datePlusTime = this.datePlusTime;
col.isAuto = false;
this.grid.context.columnSet.add(col);
}
idlClass: string;
idlFieldDef: any;
datatype: string;
+ datePlusTime: boolean;
cellTemplate: TemplateRef<any>;
cellContext: any;
isIndex: boolean;
val = this.nestedItemFieldValue(row, col);
}
}
- return this.format.transform({value: val, datatype: col.datatype});
+
+ return this.format.transform({
+ value: val,
+ datatype: col.datatype,
+ datePlusTime: Boolean(col.datePlusTime)
+ });
}
getObjectFieldValue(obj: any, name: string): any {
[cellContext]="btGridTestContext" [sortable]="false">
</eg-grid-column>
<eg-grid-column [sortable]="false" path="owner.name"></eg-grid-column>
+ <eg-grid-column [sortable]="false" path="datetime_test"
+ datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
</eg-grid>
<br/><br/>
}).pipe(map(cbt => {
// example of inline fleshing
cbt.owner(this.org.get(cbt.owner()));
+ cbt.datetime_test = new Date();
this.oneBtype = cbt;
return cbt;
}));