# DatePicker style personalization (Balzor)

**URL:** <https://forum.radzen.com/t/datepicker-style-personalization-balzor/6377>\
**Category:** Blazor Server\
**Created:** [January 20, 2021, 5:18pm UTC](https://forum.radzen.com/t/datepicker-style-personalization-balzor/6377 "2021-01-20T17:18:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![talentdotnet](https://forum.radzen.com/user_avatar/forum.radzen.com/talentdotnet/32/5731_2.png) [@talentdotnet](https://forum.radzen.com/u/talentdotnet)\
**Post date:** [January 20, 2021, 5:18pm UTC](https://forum.radzen.com/t/datepicker-style-personalization-balzor/6377/1 "2021-01-20T17:18:18Z")

</div>

Very simple question: I would like to change the background color of the selected day in the inline DatePicker. In the basic css is like blue, and I would like to change.

I have learned that I can specify the style in the declaration of the component:

> \<RadzenDatePicker Style="" TValue="DateTime?" Inline="true" Change="@(args =\> OnChange(args, "Calendar", "MM/dd/yyyy"))" /\>

Which is the value that I need to declare in the Style to change the color?

Thank you for your help.

 ![DatePicker](https://forum.radzen.com/uploads/default/original/2X/9/9c733367077ff835c4088a005289041d05c87d96.png)

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 20, 2021, 5:26pm UTC](https://forum.radzen.com/t/datepicker-style-personalization-balzor/6377/2 "2021-01-20T17:26:57Z")

</div>

Hi @talentdotnet,

You can't change the selected style background from the Style attribute of the RadzenDatePicker element. It applies only to the outermost element. You can use your browser's developer tools to inspect the selected day and see which CSS classes specify the background color.

 ![image](https://forum.radzen.com/uploads/default/original/2X/9/988266d2639da0ef34636b304127014ad90d27fc.png)

Then override that CSS rule with the desired background color:

```auto
.rz-datepicker-calendar td .rz-state-active {
   background-color: red;
}

```

Make sure you include this CSS rule after the Radzen theme. Or just use !important like this:

```auto
.rz-datepicker-calendar td .rz-state-active {
   background-color: red !important;
}

```

---

<div class="post-metadata">

**Author:** ![talentdotnet](https://forum.radzen.com/user_avatar/forum.radzen.com/talentdotnet/32/5731_2.png) [@talentdotnet](https://forum.radzen.com/u/talentdotnet)\
**Post date:** [January 20, 2021, 5:42pm UTC](https://forum.radzen.com/t/datepicker-style-personalization-balzor/6377/3 "2021-01-20T17:42:04Z")

</div>

Thank you very much for your help! Your technique is very helpful! Could you please clearing me vere I have to override the css?

I think to have understood in the "\_Host.cshtml" after the import of the css command:

> ```
> <!-- RADZEN BLAZOR -->
> <link rel="stylesheet" href="_content/Radzen.Blazor/css/default-base.css">
> 
> ```

Is it correct?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 20, 2021, 5:50pm UTC](https://forum.radzen.com/t/datepicker-style-personalization-balzor/6377/4 "2021-01-20T17:50:18Z")

</div>

It should be safe to add that to the styles.css file in your Radzen application.

---

<div class="post-metadata">

**Author:** ![talentdotnet](https://forum.radzen.com/user_avatar/forum.radzen.com/talentdotnet/32/5731_2.png) [@talentdotnet](https://forum.radzen.com/u/talentdotnet)\
**Post date:** [January 20, 2021, 6:20pm UTC](https://forum.radzen.com/t/datepicker-style-personalization-balzor/6377/5 "2021-01-20T18:20:15Z")

</div>

Thanks korchev, it works. The only thing that I have changed (for all who has the same problem) is the correct CSS rule to override, that is:

> .ui-datepicker-calendar td .ui-state-active {  
> background-color: red !important;  
> }

".ui" and not ".rz"

Thanks a lot for your help friend.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 20, 2021, 6:24pm UTC](https://forum.radzen.com/t/datepicker-style-personalization-balzor/6377/6 "2021-01-20T18:24:16Z")

</div>

You are using an older version of Radzen. The new prefix is 'rz'.
