TrevorS / bootstrap3-datetimepicker-rails

This gem packages the bootstrap-datetimepicker for the Rails 3.1+ asset pipeline.
MIT License
292 stars 123 forks source link

Incorrect readme instructions for CSS #48

Open bluengreen opened 7 years ago

bluengreen commented 7 years ago

This section is incorrect in my app. Not sure why or how you get the actual scss into your project since its a link to the other repo. But this section doesn't work

If you are using SCSS, modify your application.css.scss

// import bootstrap-sprockets before bootstrap if using bootstrap >= 3.2
@import 'bootstrap-sprockets';
@import 'bootstrap';
@import 'bootstrap-datetimepicker';

application.scss is now the default.

And @import 'bootstrap-datetimepicker'; should be @import 'bootstrap-datetimepicker.css';

Thanks

skuark commented 7 years ago

Same problem, but to import bootstrap-datetimepicker.css don't solves the problem for me: the CSS file is not loading really, you can see it in rails log or in the browser console (Chrome).

@bluengreen It is working for you with .css extension? Did you found another solution. Thanks.

skuark commented 7 years ago

Oh, I've found a solution. This application.scss works for me:

/*
 *= require_tree .
 *= require_self
 *= require bootstrap-datetimepicker
 */

@import 'bootstrap-sprockets';
@import 'bootstrap';
rdavid369 commented 6 years ago

@bluengreen is correct. You should be doing @import 'bootstrap-datetimepicker.css';, if your manifest file is a sass file, application.css.scss.

The other thing they could do, is just add a bootstrap-datetimepicker.scss file to the gem and it should be just fine.

Let me know if you want me to just make a pull request.