Error Bootstrap Year Calendar

0

I am trying to use the Bootstrap Year Calendar, to create an annual calendar, doing it just like on your website. But when I initialize, I only appear the first 4 months, and in column, that is, only one month per row as in this image:

Then I leave my code, to see if I have not put something right, I'm pretty inexperienced in this topic:

<?php
if (strpos(getcwd(), 'apen_files') !== false) {
	define('_PS_ADMIN_DIR_', getcwd());
} else {
	define('_PS_ADMIN_DIR_', getcwd().'/includes/apen_files/');
}
require (_PS_ADMIN_DIR_."/config.php"); 

?>
<head>
<link rel='stylesheet' href="css/bootstrap-year-calendar.css"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<script src="js/jquery-1.11.0.min.js"></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.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<script src="js/bootstrap-year-calendar.js"></script>
</head>
<body>
<div data-provide="calendar"></div>
</body>
<script>$(function() {
    $('#calendar').calendar();
});</script>

Thank you very much for your help.

    
asked by Joume Parra 28.06.2018 в 16:00
source

2 answers

0

According to the code that you have taught, you have several errors:

  • In the structure of the html you need the Doctype and the tag <html>
  • The javascript script at the bottom of the page is not inside the body.
  • The div where it has to load, it lacks the ID that refers to the scrip: <div id="calendar" data-provide="calendar"></div>
  • Apart from before, I've seen that the guy who created the code I think it's this page: link is not using the same bootstrap version as you.

    You have uploaded version 4.1.1 and it is using version v3.3.5

        
    answered by 28.06.2018 / 16:46
    source
    0

    It works for me, importing in this order

    <script src="js/jquery-1.11.0.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
    <script src="js/bootstrap-year-calendar.js"></script>
    <link rel='stylesheet' href="css/bootstrap-year-calendar.css"/>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
    
        
    answered by 28.06.2018 в 16:24