简体   繁体   English

Bootstrap-Year-Calendar 垂直显示所有月份而不是水平显示

[英]Bootstrap-Year-Calendar showing all the months Vertically instead of Horizontally

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.我已经实现了 Bootstrap-Year-Calendar 插件,但是它是垂直显示的,我不知道它是否与我的脚本或链接有任何关系。 I tried changing the version of my Jquery and bootstrap version but the result is the same.我尝试更改我的 Jquery 和 bootstrap 版本,但结果是一样的。

I was following these instructions: http://www.bootstrap-year-calendar.com/#Documentation/Installation我按照以下说明进行操作: http : //www.bootstrap-year-calendar.com/#Documentation/Installation

This is my code:这是我的代码:

<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这是现在的样子

This is because you're using bootstrap 4. Bootstrap-Year-Calendar works with Bootstrap 3 versions only .这是因为您使用的是 bootstrap 4。Bootstrap-Year-Calendar 仅适用于 Bootstrap 3 版本 If you can't use bootstrap3 in your site there is a fork customized for BS4.如果您不能在您的站点中使用 bootstrap3,则有一个为 BS4 定制的分支

From fork authors comment :- He has Migrated the classes that relied on deprecated BS3 classes and it should work.来自 fork 作者评论:- 他已经迁移了依赖于已弃用的 BS3 类的类,它应该可以工作。 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/ ) BS4 不再使用 glyphicons,因此他使用 open-iconic 作为依赖项,因为它是他们推荐的图标来源之一( https://getbootstrap.com/docs/4.0/extend/icons/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM