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
<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>
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:
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:
We hope that this helps you. Please let us know if you need further assistance.
Regards,
Indumathi R
- 1 Reply
- 2 Participants
-
GR Gerson Rodriguez
- Jul 18, 2024 11:48 AM UTC
- Jul 19, 2024 04:55 AM UTC