-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using importmap in rails7, datepicker does not work in dark mode. #24
Comments
I posted the above source to https://github.com/d6rkaiz/flowbite_datepicker |
I'm encountering a similar issue, so I'm following this thread in case there are updates. |
+1 |
Same issue using 2.5.2 using import map with rails 7. |
My setup is easy and simple, don't use a night mode so it's fine /config/importmap.rb and |
I am trying to use datepicker in rails 7 with importmap, but it does not work when in dark mode.
/config/importmap.rb
/app/javascript/application.js
I am using the flowbit official date range picker as a sample, at which point it looks like this attachment.
cf: https://flowbite.com/docs/plugins/datepicker/#date-range-picker
Although it is not mentioned in the documentation for using importmap, the following is what it looks like after introducing flowbite.min.css.
/app/view/layoouts/application.html.haml
= csp_meta_tag = stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" = stylesheet_link_tag "application", "data-turbo-track": "reload" + %link{:href => "https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.0.0/flowbite.min.css", :rel => "stylesheet"}/ = javascript_importmap_tags %body.bg-white-200.dark:bg-slate-900.dark:text-white
It works, however, the behavior in dark mode is not right with this method.
If I change the loading position of the css, I get the following.
= csp_meta_tag + %link{:href => "https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.0.0/flowbite.min.css", :rel => "stylesheet"}/ = stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" = stylesheet_link_tag "application", "data-turbo-track": "reload" = javascript_importmap_tags %body.bg-white-200.dark:bg-slate-900.dark:text-white
The dialog that appears when the year and month are clicked is not correct.
What is the correct way to do this?
The text was updated successfully, but these errors were encountered: