blob: fc99c7bffa1fa6b3ac03d16c941885d8d2c4d70e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'rdp-datepicker-editor',
styleUrls: ['./rdp-datepicker-editor.component.scss'],
template:`
<mat-form-field>
<input [(ngModel)]="columnValue" name="{{columntitle}}" matInput [matDatepicker]="date"
placeholder="MM/dd/yyyy">
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
<mat-datepicker #date></mat-datepicker>
</mat-form-field>
`
})
export class RdpDatepickerEditorComponent implements OnInit {
@Input() rowdata :any;
@Input() columntitle: any
columnValue: any;
constructor() { }
ngOnInit() {
console.log("RdpDatepickerEditorComponent Row Data ::: ",this.rowdata);
let rowObj = JSON.parse(this.rowdata);
let column = this.columntitle;
this.columnValue = rowObj[column];
}
}
|