From 0d707207d64d19945c08a2605ac311ba158c3b48 Mon Sep 17 00:00:00 2001 From: hp Date: Mon, 21 Oct 2024 03:12:27 +0530 Subject: [PATCH] Solve Dark Mode Visibility on Instant OPD Section --- client/src/pages/OPDRegistration.jsx | 394 ++++++++++++++------------- client/src/styles/OPD.css | 21 ++ 2 files changed, 219 insertions(+), 196 deletions(-) diff --git a/client/src/pages/OPDRegistration.jsx b/client/src/pages/OPDRegistration.jsx index 99f38834..8142b4ca 100644 --- a/client/src/pages/OPDRegistration.jsx +++ b/client/src/pages/OPDRegistration.jsx @@ -171,219 +171,221 @@ function OPDRegistrationForm() { return ( <> +

OPD Registration

-
-
- - - {errors.name && {errors.name}} -
- -
- - - {errors.email && {errors.email}} -
+ +
+ + + {errors.name && {errors.name}} +
-
- - - {errors.age && {errors.age}} -
+
+ + + {errors.email && {errors.email}} +
-
- - - {errors.gender && {errors.gender}} -
+
+ + + {errors.age && {errors.age}} +
-
- - - {errors.contact && {errors.contact}} -
+
+ + + {errors.gender && {errors.gender}} +
-
- - - {errors.address && {errors.address}} -
+
+ + + {errors.contact && {errors.contact}} +
-
- - - {errors.pincode && {errors.pincode}} -
+
+ + + {errors.address && {errors.address}} +
-
- - - {errors.department && ( - {errors.department} - )} -
+
+ + + {errors.pincode && {errors.pincode}} +
-
- - - {errors.reason && {errors.reason}} -
+
+ + + {errors.department && ( + {errors.department} + )} +
-
- - - {errors.date && {errors.date}} -
+
+ + + {errors.reason && {errors.reason}} +
-
- - - {errors.report && {errors.report}} -
-
- - - {errors.reason && {errors.reason}} -
+
+ + + {errors.date && {errors.date}} +
-
- +
+ + + {errors.report && {errors.report}} +
+
+ + + {errors.reason && {errors.reason}} +
- - Back to Home - -
-
+
+ + + + Back to Home + +
+
+
{showModal && (
diff --git a/client/src/styles/OPD.css b/client/src/styles/OPD.css index fc9e6e0b..b7b606fd 100644 --- a/client/src/styles/OPD.css +++ b/client/src/styles/OPD.css @@ -328,3 +328,24 @@ input[type='file'] { .dark .OPDText { color: #f1f1f1; } + + +/* Dark mode date picker styling */ +input[type="date"].input-dark { + background-color: #333; + /* Dark background */ + color: #fff; + /* Light text */ + border: 1px solid #ccc; + /* Border color for contrast */ +} + +/* Light mode date picker styling */ +input[type="date"] { + background-color: #fff; + /* Default light background */ + color: #000; + /* Default dark text */ + border: 1px solid #ccc; + /* Default border color */ +}