Bootstrap-Year-Calendar显示所有月份的垂直而不是水平的月份 [英] Bootstrap-Year-Calendar showing all the months Vertically instead of Horizontally

查看:81
本文介绍了Bootstrap-Year-Calendar显示所有月份的垂直而不是水平的月份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了Bootstrap-Year-Calendar插件,但是它是垂直显示的,我不知道它是否对我的脚本或链接有任何作用. 我尝试更改Jquery和Bootstrap版本的版本,但结果是相同的.

I have implemented the Bootstrap-Year-Calendar plug-in but it appears vertically, I don't know if it has to do anything with my scripts or links. I tried changing the version of my Jquery and bootstrap version but the result is the same.

我正在遵循以下说明: http://www.bootstrap-year-calendar.com/#Documentation/Installation

I was following these instructions:http://www.bootstrap-year-calendar.com/#Documentation/Installation

这是我的代码:

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap css-->

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

    <link rel="stylesheet" href="{{ static_url('css/bootstrap.min.css') }}">

    <!-- CUSTOM & PAGES STYLE -->
    <link rel="stylesheet" href="{{ static_url('css/custom.css') }}">


</head>

<body>

<div class="container">
<div data-provide="calendar" class="calendar">

    </div>      
</div>


<!-- Bootsrap -->
<script src="https://code.jquery.com/jquery-2.2.4.js" integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>

<link rel="stylesheet" href="{{ static_url('css/bootstrap-year-calendar.min.css') }}">
<script src="{{ static_url('js/bootstrap-year-calendar.min.js') }}"></script>

<script>
$(function() {
    $('#calendar').calendar();
});
</script>
</body>

</html>


这就是现在的样子


This is how it looks now

推荐答案

这是因为您使用的是Bootstrap4. Bootstrap-Year-Calendar仅适用于Bootstrap 3版本.如果您不能在站点中使用bootstrap3,则为BS4自定义 fork .

This is because you're using bootstrap 4. Bootstrap-Year-Calendar works with Bootstrap 3 versions only. If you can't use bootstrap3 in your site there is a fork customized for BS4.

来自叉子作者评论: -他已经迁移了依赖于不推荐使用的BS3类的类,并且该类应该可以工作. BS4不再使用字形符号,因此他将open-iconic用作依赖项,因为它是图标的推荐来源之一( https://getbootstrap.com/docs/4.0/extend/icons/)

From fork authors comment:- He has Migrated the classes that relied on deprecated BS3 classes and it should work. BS4 no longer uses glyphicons,So he used open-iconic as a dependency, as it was one of their recommended sources for icons (https://getbootstrap.com/docs/4.0/extend/icons/)

免责声明:我与图书馆及其叉子都没有任何联系.

Disclaimer: I have no connection with both library and its fork.

这篇关于Bootstrap-Year-Calendar显示所有月份的垂直而不是水平的月份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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