Skip to content

IE 11 Datepicker not working #8228

Closed
@tianyangj

Description

@tianyangj

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Datepicker should work

What is the current behavior?

Datepicker is throwing exception

What are the steps to reproduce?

Use IE 11, go to https://material.angular.io/components/datepicker/overview, then try open datepicker

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

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

Material Beta.12

Is there anything else we should know?

I think this is introduced after #5747.

https://github.com/angular/material2/blob/master/src/lib/core/datetime/native-date-adapter.ts#L74, useUtcForDisplay is hard coded to true. According to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat IE 11 doesn't support timeZone option.

I tested the following script on IE 11 console, it is returning error.

var options = { year: 'numeric', month: 'short', timeZone: 'utc' };
console.log(new Intl.DateTimeFormat('en-US', options).format(new Date()));

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions