rails4 上的 bootstrap-datepicker-rails [英] bootstrap-datepicker-rails on rails4

查看:26
本文介绍了rails4 上的 bootstrap-datepicker-rails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 bootstrap-datepicker-rails 时遇到问题.我正在 Rails 4 上编写项目,并且已经安装了 gem.我的 application.css 看起来像:

I have a problem with bootstrap-datepicker-rails. I am writing project on rails 4 and I've installed the gem. My application.css looks like:

*= require_self
*= require bootstrap-datepicker
*= require_tree .

我的 application.js 看起来像:

My application.js looks like:

//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require bootstrap
//= require bootstrap-datepicker
//= require_tree

日期选择器正在工作,但不包括样式.我的 html 是:

The datepicker is working but it does not include the styles. My html for it is:

%input{"data-behaviour" => "datepicker", type: "text"}/
:javascript
  $(document).ready(function(){
    $('[data-behaviour~=datepicker]').datepicker();
  })

看起来像这样:

你有什么想法吗?

推荐答案

我使用这个 gem 现在一切都很好——

这篇关于rails4 上的 bootstrap-datepicker-rails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆