These are chat archives for angular/material

31st
Jul 2017
pantonis
@pantonis
Jul 31 2017 12:16
I have an md-input and when I call this.inputFormControl.disable() I get Cannot read property 'disable' of undefined
Rafe
@kemmis_twitter
Jul 31 2017 12:22
Does anyone know if there's a DateModule implementation that does a better (more accurate) job validating dates input into the DatePicker component in the standard MM/DD/YYYY format? (better than the standard MdNativeDateModule class)
Luke Skelhorn
@SCRATK
Jul 31 2017 12:26
@kemmis_twitter import { DatePipe } from '@angular/common';
This is how I've done it
var datePipe = new DatePipe('en-US');
this.newEventForm.value.start_date = datePipe.transform(this.newEventForm.value.start_date, 'yyyy-MM-dd');
Rafe
@kemmis_twitter
Jul 31 2017 12:28
@SCRATK does that only apply the formatting to the first setting of the value though?
Luke Skelhorn
@SCRATK
Jul 31 2017 12:33
How I've done it it safes it to the database in laravel and when it calls it back its fine and you can edit it too
Rafe
@kemmis_twitter
Jul 31 2017 12:37
Thanks @SCRATK I will try out the DatePipe then.
Luke Skelhorn
@SCRATK
Jul 31 2017 12:38
@kemmis_twitter Your welcomes