We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to use datepicker in rails 7 with importmap, but it does not work when in dark mode.
/config/importmap.rb
# Pin npm packages by running ./bin/importmap pin "application", preload: true pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true pin_all_from "app/javascript/controllers", under: "controllers" pin "flowbite", to: "https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.0.0/flowbite.turbo.min.js" pin "flowbite-datepicker", to: "https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.0.0/datepicker.turbo.min.js"
/app/javascript/application.js
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails import "@hotwired/turbo-rails" import "controllers" import 'flowbite' import 'flowbite-datepicker'
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:
I posted the above source to https://github.com/d6rkaiz/flowbite_datepicker
Sorry, something went wrong.
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.
No branches or pull requests
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: