Promact / md2

Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Collapse, Colorpicker, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.
http://code.promactinfo.com/md2/
MIT License
379 stars 112 forks source link

Disabled dates on Datepicker (Month mode) can still be selected #269

Closed jedcua closed 7 years ago

jedcua commented 7 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Dates on Datepicker on Month mode with defined minimum date must be disabled.

What is the current behavior?

Invalid dates can still be selected

What are the steps to reproduce?

<md2-datepicker fxFlex type="month" mode="portrait" touchUi="true" placeholder="From" [min]="minDate" [(ngModel)]="fromDate"></md2-datepicker>
export class GenerateDatesComponent implements OnInit {
  // ...
  constructor(
    public dialog: MdDialogRef<GenerateDatesComponent>
  ) {
    this.minDate = new Date();
    this.fromDate = this.minDate;
  }
}

The invalid dates appears disabled: screenshot - friday 04 august 2017 - 11 16 54 pht

When I can still click on them and it will be selected: screenshot - friday 04 august 2017 - 11 17 33 pht

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

Disabled dates should not be selected.

Which versions of Angular, MD2, OS, browsers are affected?

Angular 4.0.0 md2 0.0.26 on Ubuntu 14.04 using Google Chrome 57.0.2987.133

Is there anything else we should know?

You guys are awesome.

krupa310 commented 7 years ago

@jedcua will provide it in next build