Skip to content

[Feature-Request] Ability to set theme/color of the datepicker calendar popup #9658

Closed
@benjamincharity

Description

@benjamincharity

Bug, feature request, or proposal:

Currently you can set the [color] property of the input attached to the datepicker. But there doesn't seem to be a way to change the color of the calendar itself.

So the focused input may be set to your accent color, but when the calendar opens it is still using the primary color.

input is using accent color - green

screen shot 2018-01-29 at 8 20 03 am

calendar still using primary color - blue

screen shot 2018-01-29 at 8 20 07 am

What is the expected behavior?

We should have the ability to match the calendar selection color to the input focus color. Either via the [color] directive or the ability to add classes to the calendar container.

What is the current behavior?

Currently there is no way to set the theme/color or add custom classes to the calendar popup container.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-datepicker-theme?file=app/app.component.html

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

For the calendar color to match the attached input color. (without forcing the calendar to always use the primary color).

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

Angular 5.1.2

Metadata

Metadata

Assignees

No one assigned

    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