- Home
- Forum
- Xamarin.Forms
- The calendar in this picker on Android has a Pink background.
The calendar in this picker on Android has a Pink background.
Attached is a screenshot. Can you help provide the info I need to change the pink background in the calendar picker. I also noticed that the blinking cursor when I enter an <Entry /> control is also pink and the "Drop" indicator that shows where the cursor is in the control is also pink. How can I change these colors?
Attachment: IMG_0983.jpg_5a0174b6.zip
Thanks,!
<!-- Date of Birth -->
<Grid WidthRequest="200" HorizontalOptions="FillAndExpand" >
<inputLayout:SfTextInputLayout
x:Name="birthdayLayout"
ContainerType="Outlined"
HelperText="Enter your birth date"
LeadingViewPosition="Inside"
BackgroundColor="White"
HasError="{Binding HasDOBError}"
Margin="0,0,0,0"
TrailingViewPosition="Inside"
Hint="Date of Birth"
FocusedColor="{StaticResource CatchStatLightBlue}">
<Entry x:Name="validDate" Text="{Binding ValidityDate}"
HorizontalTextAlignment="Start" FontSize="Small" HeightRequest="45"/>
<inputLayout:SfTextInputLayout.HorizontalOptions>
<LayoutOptions Alignment="Start"/>
</inputLayout:SfTextInputLayout.HorizontalOptions>
<inputLayout:SfTextInputLayout.HintLabelStyle>
<inputLayout:LabelStyle FontSize="Small">
</inputLayout:LabelStyle>
</inputLayout:SfTextInputLayout.HintLabelStyle>
<inputLayout:SfTextInputLayout.TrailingView >
<Label
FontSize="Small"
Text="D"
TextColor="{Binding Path=CurrentActiveColor, Source={x:Reference Name=birthdayLayout}}"
VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer x:Name="labelGesture" Tapped="GestureRecognizer_Tapped" />
</Label.GestureRecognizers>
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="iOS" Value="InputLayoutIcons" />
<On Platform="Android" Value="InputLayoutIcons.ttf#InputLayoutIcons" />
</OnPlatform>
</Label.FontFamily>
</Label>
</inputLayout:SfTextInputLayout.TrailingView>
</inputLayout:SfTextInputLayout>
<DatePicker
x:Name="date_Picker"
Date="{Binding DateOfBirth}"
MaximumDate="{x:Static system:DateTime.Now}"
BackgroundColor="{StaticResource CatchStatLightBlue}"
Opacity="0"
TextColor="Black"
VerticalOptions="CenterAndExpand" />
<inputLayout:SfTextInputLayout.HintLabelStyle>
<inputLayout:LabelStyle FontSize="Small">
</inputLayout:LabelStyle>
</inputLayout:SfTextInputLayout.HintLabelStyle>
</Grid>
<Grid WidthRequest="200" HorizontalOptions="FillAndExpand" >
<inputLayout:SfTextInputLayout
x:Name="birthdayLayout"
ContainerType="Outlined"
HelperText="Enter your birth date"
LeadingViewPosition="Inside"
BackgroundColor="White"
HasError="{Binding HasDOBError}"
Margin="0,0,0,0"
TrailingViewPosition="Inside"
Hint="Date of Birth"
FocusedColor="{StaticResource CatchStatLightBlue}">
<Entry x:Name="validDate" Text="{Binding ValidityDate}"
HorizontalTextAlignment="Start" FontSize="Small" HeightRequest="45"/>
<inputLayout:SfTextInputLayout.HorizontalOptions>
<LayoutOptions Alignment="Start"/>
</inputLayout:SfTextInputLayout.HorizontalOptions>
<inputLayout:SfTextInputLayout.HintLabelStyle>
<inputLayout:LabelStyle FontSize="Small">
</inputLayout:LabelStyle>
</inputLayout:SfTextInputLayout.HintLabelStyle>
<inputLayout:SfTextInputLayout.TrailingView >
<Label
FontSize="Small"
Text="D"
TextColor="{Binding Path=CurrentActiveColor, Source={x:Reference Name=birthdayLayout}}"
VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer x:Name="labelGesture" Tapped="GestureRecognizer_Tapped" />
</Label.GestureRecognizers>
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="iOS" Value="InputLayoutIcons" />
<On Platform="Android" Value="InputLayoutIcons.ttf#InputLayoutIcons" />
</OnPlatform>
</Label.FontFamily>
</Label>
</inputLayout:SfTextInputLayout.TrailingView>
</inputLayout:SfTextInputLayout>
<DatePicker
x:Name="date_Picker"
Date="{Binding DateOfBirth}"
MaximumDate="{x:Static system:DateTime.Now}"
BackgroundColor="{StaticResource CatchStatLightBlue}"
Opacity="0"
TextColor="Black"
VerticalOptions="CenterAndExpand" />
<inputLayout:SfTextInputLayout.HintLabelStyle>
<inputLayout:LabelStyle FontSize="Small">
</inputLayout:LabelStyle>
</inputLayout:SfTextInputLayout.HintLabelStyle>
</Grid>
Attachment: IMG_0983.jpg_5a0174b6.zip
SIGN IN To post a reply.
1 Reply
RA
Rachel A
Syncfusion Team
June 18, 2019 11:49 AM UTC
Hi Brian,
Thanks for your interest in Syncfusion products.
You can refer the below link to change the background color of the date picker.
Regards,
Rachel.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
BA Brian Adams
- Jun 17, 2019 09:58 PM UTC
- Jun 18, 2019 11:49 AM UTC