Hi Jan,
Based on the shared details, we have checked the reported
scenario “unable to change the OK/Cancel button text color in SfDataForm
DatePicker”.
As per the current implementation, the Syncfusion
SfDataForm uses the .NET MAUI DatePicker control, which on Android, displays a
native DatePicker dialog. The OK/Cancel button colors are controlled by Android
theme attributes and are not affected by DataForm or XAML styling.
This is a known limitation in .NET MAUI (Android) where
there is no direct API to style the DatePicker dialog buttons individually.
Framework issue link - https://github.com/dotnet/maui/issues/31739.
A workaround, you can override the theme colors as
follows:
|
<resources>
<color
name="colorPrimary">#E94E1B</color>
<color
name="colorAccent">#E94E1B</color>
</resources>
|
This ensures the dialog
(including OK/Cancel buttons) uses the desired color.
We have prepared a simple sample, demonstrating the above
approach and have attached it below for your reference.
We hope that this helps you. Please let us know if you
need further assistance.
Regards,
Vishal O.
Attachment:
DataFormDemo_de6fda2a.zip