about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan McLeod <excitinglyboring@gmail.com>2024-12-02 21:25:10 -0500
committerGitHub <noreply@github.com>2024-12-03 02:25:10 +0000
commit147efb628a9eea755dd2901a82f39f14435f6629 (patch)
tree0e8e1c7a60041a4699375e19d48a16e255f6a66b
parent84f4afd3d75eb50e96e4cee758f41b186f8a510d (diff)
downloadvoidsky-147efb628a9eea755dd2901a82f39f14435f6629.tar.zst
Fix title/buttons in date picker not being visible on Android in dark mode (#6880)
-rw-r--r--package.json2
-rw-r--r--src/components/forms/DateField/index.android.tsx3
-rw-r--r--yarn.lock8
3 files changed, 8 insertions, 5 deletions
diff --git a/package.json b/package.json
index b7f3e4d49..6372dd5f5 100644
--- a/package.json
+++ b/package.json
@@ -169,7 +169,7 @@
     "react-keyed-flatten-children": "^3.0.0",
     "react-native": "0.74.1",
     "react-native-compressor": "^1.8.24",
-    "react-native-date-picker": "^4.4.2",
+    "react-native-date-picker": "^5.0.7",
     "react-native-drawer-layout": "^4.0.1",
     "react-native-gesture-handler": "2.20.0",
     "react-native-get-random-values": "~1.11.0",
diff --git a/src/components/forms/DateField/index.android.tsx b/src/components/forms/DateField/index.android.tsx
index 1830ca4bf..0fd5bca01 100644
--- a/src/components/forms/DateField/index.android.tsx
+++ b/src/components/forms/DateField/index.android.tsx
@@ -50,11 +50,14 @@ export function DateField({
       />
 
       {open && (
+        // Android implementation of DatePicker currently does not change default button colors according to theme and only takes hex values for buttonColor
+        // Can remove the buttonColor setting if/when this PR is merged: https://github.com/henninghall/react-native-date-picker/pull/871
         <DatePicker
           modal
           open
           timeZoneOffsetInMinutes={0}
           theme={t.name === 'light' ? 'light' : 'dark'}
+          buttonColor={t.name === 'light' ? '#000000' : '#ffffff'}
           date={new Date(value)}
           onConfirm={onChangeInternal}
           onCancel={onCancel}
diff --git a/yarn.lock b/yarn.lock
index 54e0ddd33..474ef2f8b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -16105,10 +16105,10 @@ react-native-compressor@^1.8.24:
   resolved "https://registry.yarnpkg.com/react-native-compressor/-/react-native-compressor-1.8.24.tgz#3cc481ad6dfe2787ec4385275dd24791f04d9e71"
   integrity sha512-PdwOBdnyBnpOag1FRX9ks4cb0GiMLKFU9HSaFTHdb/uw6fVIrnCHpELASeliOxlabWb5rOyVPbc58QpGIfZQIQ==
 
-react-native-date-picker@^4.4.2:
-  version "4.4.2"
-  resolved "https://registry.yarnpkg.com/react-native-date-picker/-/react-native-date-picker-4.4.2.tgz#f7bb9daa8559237e08bd30f907ee8487a6e2a6ec"
-  integrity sha512-wYKN8nYWhETVHJV/+Im30JOdzkFRwYRrDlEOyyYesOjt+1JTFJh9M7K5CqePLOIB4Nxlf2f2lRSI0VoUyFIovA==
+react-native-date-picker@^5.0.7:
+  version "5.0.7"
+  resolved "https://registry.yarnpkg.com/react-native-date-picker/-/react-native-date-picker-5.0.7.tgz#24161d30c6dca8627afe1aa5a55a389421fdfba4"
+  integrity sha512-/RodyCZWjb+f3f4YHqKbWFYczGm+tNngwbVSB6MLGgt5Kl7LQXpv4QE6ybnHW+DM4LteTP8A6lj8LEkQ7+usLQ==
 
 react-native-dotenv@^3.3.1:
   version "3.4.9"