Skip to content

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

Closed

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

Activity

  1. crisbeto commented on Jan 29, 2018

    @crisbeto
    Member

    Will be sorted out by #9407.

  2. angular-automatic-lock-bot commented on Sep 10, 2019

    @angular-automatic-lock-bot

    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.

  3. locked and limited conversation to collaborators on Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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