DatePicker Styling Question...

1 Answer 47 Views
DatePicker
Sean
Top achievements
Rank 2
Iron
Sean asked on 18 Jan 2024, 06:57 PM | edited on 18 Jan 2024, 06:58 PM

I am trying to get the background color for the RadDatePicker to be white. It is picking up a color that I am unaware of specifying ( read I did not do it intentionally :-) )

I found general styling instructions for the controls that indicated the proper way would be to create a style...

<Style TargetType="Label" x:Key="DateDisplayLabelStyle">
  <Setter Property="TextColor" Value="#007A53"/>
  <Setter Property="BackgroundColor" Value="White"/>
</Style>

I am unsure how to get the lighter green color set to white. I did not see a name for this part of the control in the documentation.

 

Thanks

-Sean

1 Answer, 1 is accepted

Sort by
0
Accepted
Didi
Telerik team
answered on 19 Jan 2024, 11:06 AM

Hello Sean,

The lighter green color is actually the background color of the control. So in order to change it set the BackgroundColor property to the RadDatePicker.

    <ContentPage.Resources>
        <ResourceDictionary>
            <Style TargetType="Label" x:Key="DateDisplayLabelStyle">
                <Setter Property="TextColor" Value="#007A53"/>
                <Setter Property="BackgroundColor" Value="LightBlue"/>
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>
    <VerticalStackLayout>
        <telerik:RadDatePicker BackgroundColor="Red" x:Name="picker"
                              
                               DisplayLabelStyle="{StaticResource DateDisplayLabelStyle}"/>
    </VerticalStackLayout>

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Sean
Top achievements
Rank 2
Iron
commented on 19 Jan 2024, 12:51 PM

Thank you Didi :-)
Tags
DatePicker
Asked by
Sean
Top achievements
Rank 2
Iron
Answers by
Didi
Telerik team
Share this question
or