Skip to content

MdYearView appears broken when selecting month/year #6092

Closed
@deremer

Description

@deremer

Bug, feature request, or proposal:

What is the expected behavior?
md-datepicker should not be broken and should allow you to select a month that does not have 31 days in it. When using the date picker to pick a different month and year, we get an error "Invalid date "31" for month with index "1"".. this happens for any month that does not have 31 days.

What is the current behavior?
If you select a month that does not have 31 days in it you get an error.
image

What are the steps to reproduce?
Select a month that does not have 31 days in it.

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

<md-input-container class="form-width">
              <input mdInput formControlName="birthdate" [mdDatepicker]="picker" placeholder="Birthdate">
              <button mdSuffix [mdDatepickerToggle]="picker"></button>
</md-input-container>

What is the use-case or motivation for changing an existing behavior?
People should be able to select a date using a date picker.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?
We are using 2.0.0-beta.8.

Is there anything else we should know?
That I understand why you need these templates, but for a simple and pretty clear issue to report, it puts a lot of extra work on those of us trying to use this and help by reporting issues. Trying to be helpful here. But noted...

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions