Answers for "datetime local field"

8

input datetime

<input type="datetime-local">
Posted by: Guest on August-10-2020
1

mat input datetime-local now

@Component({
    selector: 'app',
    template: `<input type="datetime-local" [value]="date" 
          (change)="date=$event.target.value" /> {{date}}` 
})
export class AppComponent {
    date: string;
    constructor() {
        this.date = new Date().toISOString().slice(0, 16);
    }
}
Posted by: Guest on November-24-2020

Browse Popular Code Answers by Language