mat input datetime local now

Solutions on MaxInterview for mat input datetime local now by the best coders in the world

showing results for - "mat input datetime local now"
Ray
03 May 2018
1@Component({
2    selector: 'app',
3    template: `<input type="datetime-local" [value]="date" 
4          (change)="date=$event.target.value" /> {{date}}` 
5})
6export class AppComponent {
7    date: string;
8    constructor() {
9        this.date = new Date().toISOString().slice(0, 16);
10    }
11}
12