components icon indicating copy to clipboard operation
components copied to clipboard

[mdDatepickerToggle] re #6053 closed

Open MatteoNY opened this issue 9 years ago • 5 comments

This was closed as per: #6053 input disabled. Stated in next release, I'm reporting it does not appear to be fixed in 2.0.0-beta.10 Next release? Input field gets disabled but button does not. If I add "disable" on the md-datepicker-toggle it will be disabled. Tried using ng-disabled and disabled="booleanValue" does not complain but does not disable. Also needed to use a [formControl] to force the input field for the datepicker to be disabled ng-disable= or disable= did not work as expected.

Thanks!

Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: https://goo.gl/DlHd6U

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Is there anything else we should know?

MatteoNY avatar Sep 21 '17 16:09 MatteoNY

Also as a note, I think the disabled interactions between the input, toggle, and datepicker should be explicitly stated in the docs.

willshowell avatar Sep 21 '17 17:09 willshowell

I was able to get the button to be disabled by using the following: @ViewChild('pickerReturnDate') pickerReturnDate: any; When I want the button to be disabled I'm using: this.pickerReturn.disabled = this.isTrueValue; The above is a work-around when the input is disabled via [formControl]="date2Ctrl", for example, this.disableReturnDate ? this.date2Ctrl.disable() : this.date2Ctrl.enable(); This snippet disabled or enables the date picker's input field but the button remains enabled. The @ViewChild sort of fixes it but the button looks enabled but when you click gets disabled. Not as smooth but workable. I hope this will be fixed in the future. Great work all is good with NVDA screen reader tests. :-)

MatteoNY avatar Sep 22 '17 17:09 MatteoNY

Oh it may be a duplicate of https://github.com/angular/material2/issues/6973. Didn't see you were using reactive forms.

willshowell avatar Sep 22 '17 17:09 willshowell

I suspect this was fixed by #7514 please feel free to open a new issue if that is not the case

mmalerba avatar Nov 21 '17 20:11 mmalerba

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.