Dudes of angular2 material apparently did not want to show how to get the currently selected date...selectedChanged returns the last date.
<md-input-container>
<input mdInput [mdDatepicker]="picker" placeholder="Choose a date" [(ngModel)]="wtf">
<button mdSuffix [mdDatepickerToggle]="picker"></button>
</md-input-container>
<md-datepicker #picker [startAt]="startDate" (selectedChanged)="duder()"></md-datepicker>
duder(){
console.log('duder',this.startDate,this.wtf)
console.log('duder--r',moment(this.wtf).format('DD-MM-YYYY'))
}
I mean wow..I make a change..and what I get is the last date..not the current date that I selected.
If I change the date..how do I get the current date from my duder() function?