colour of the SfDateTimePicker Header indicator

Good morning, would anyone know how to change the colour of the SfDateTimePicker Header indicator. 

thank you very much for your help

Image_5936_1721303223974


<picker:SfDateTimePicker x:Name="fechasn" BackgroundColor="White" DateFormat="dd_MMM_yyyy" TimeFormat="HH_mm" MinuteInterval="5" TextDisplayMode="Default" Mode="Dialog" SelectionChanged="fechasn_SelectionChanged">


    <picker:SfDateTimePicker.HeaderView >

        <picker:DateTimePickerHeaderView Background="White" TimeFormat="hh:mm" >

            <picker:DateTimePickerHeaderView.TextStyle>

                <picker:PickerTextStyle FontSize="14" TextColor="Black" FontAttributes="Bold" />

            </picker:DateTimePickerHeaderView.TextStyle>

        </picker:DateTimePickerHeaderView>

    </picker:SfDateTimePicker.HeaderView>


    <picker:SfDateTimePicker.ColumnHeaderView>

        <picker:DateTimePickerColumnHeaderView Background="#D3D3D3" DividerColor="#D3D3D3" >

            <picker:DateTimePickerColumnHeaderView.TextStyle>

                <picker:PickerTextStyle FontSize="14" TextColor="Black" FontAttributes="Bold" />

            </picker:DateTimePickerColumnHeaderView.TextStyle>

        </picker:DateTimePickerColumnHeaderView>

    </picker:SfDateTimePicker.ColumnHeaderView>


    <picker:SfDateTimePicker.SelectionView>

        <picker:PickerSelectionView CornerRadius="20" Padding="5" />

    </picker:SfDateTimePicker.SelectionView>


</picker:SfDateTimePicker>


1 Reply

SG Santhosh Govindasamy Syncfusion Team July 19, 2024 04:55 AM UTC

Hi Gerson,


Regarding Query: anyone know how to change the colour of the SfDateTimePicker Header indicator. 


Based on the information provided, we have cheked your request regarding the customization of the header text style color in the DateTimePicker. To achieve this, you can utilize the TextStyle and SelectedTextStyle properties within the DateTimePickerHeaderView. These properties allow you to adjust the color and style of the header text as per your requirements.


API link:

https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Picker.DateTimePickerHeaderView.html#Syncfusion_Maui_Picker_DateTimePickerHeaderView_SelectionTextStyle


Code snippet:


    <picker:SfDateTimePicker x:Name="picker" BackgroundColor="White" DateFormat="dd_MMM_yyyy"

                             TimeFormat="HH_mm"

                             MinuteInterval="5"

                             TextDisplayMode="Default"

                             Mode="Dialog" IsOpen="True">

        <picker:SfDateTimePicker.HeaderView >

            <picker:DateTimePickerHeaderView TimeFormat="hh:mm" >

                <picker:DateTimePickerHeaderView.TextStyle>

                    <picker:PickerTextStyle FontSize="14" TextColor="Black" FontAttributes="Bold" />

                </picker:DateTimePickerHeaderView.TextStyle>

                <picker:DateTimePickerHeaderView.SelectionTextStyle>

                    <picker:PickerTextStyle FontSize="14" TextColor="Black" FontAttributes="Bold" />

                </picker:DateTimePickerHeaderView.SelectionTextStyle>

            </picker:DateTimePickerHeaderView>

        </picker:SfDateTimePicker.HeaderView>

        <picker:SfDateTimePicker.ColumnHeaderView>

            <picker:DateTimePickerColumnHeaderView Background="#D3D3D3" DividerColor="#D3D3D3" >

                <picker:DateTimePickerColumnHeaderView.TextStyle>

                    <picker:PickerTextStyle FontSize="14" TextColor="Black" FontAttributes="Bold" />

                </picker:DateTimePickerColumnHeaderView.TextStyle>

            </picker:DateTimePickerColumnHeaderView>

        </picker:SfDateTimePicker.ColumnHeaderView>

        <picker:SfDateTimePicker.SelectionView>

            <picker:PickerSelectionView CornerRadius="20" Padding="5" />

        </picker:SfDateTimePicker.SelectionView>

    </picker:SfDateTimePicker>



Screenshot:


A screenshot of a phone

Description automatically generated


We hope that this helps you. Please let us know if you need further assistance.


Regards,

Indumathi R


Loader.
Up arrow icon