kisphp / calendar-bundle
Kisphp calendar bundle
Installs: 28
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
pkg:composer/kisphp/calendar-bundle
Requires
- php: >=7.0
 
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.9
 - phpstan/phpstan: ^0.6.4
 - phpunit/phpunit: ~6.1
 - symfony/var-dumper: ~3.0
 - twig/twig: ^2.4
 
This package is not auto-updated.
Last update: 2025-10-21 20:21:43 UTC
README
Installation
composer require kisphp/calendar-bundle
Usage
<?php
use Kisphp\CalendarBundle\Translations\LangRo;
use Kisphp\CalendarBundle\Services\Calendar;
$translation = new LangRo();
$calendar = new Calendar($translation);
$calendar->generateData($year, $month, date('d'));
// get generated days as array
$calendar->getDays();
Add css to your page (Symfony)
<link href="bundles/calendar/css/calendar.css" rel="stylesheet" /> 
Extend calendar
Here is an example on how to make the callendar responsive. All you have to do is to extend the scss file:
$column_width: 100%/7;
$column_height: 35px;
$font-size: 16px;
$active_background: #369;
$active_color: #fff;
$col_border_width: 0;
@import "vendor/kisphp/calendar-bundle/gulp/assets/scss/calendar.scss";
.kisphp-calendar {
  .col {
    &:hover {
      background: #ccc;
      .out {
        color: #fff;
      }
    }
    .active {
      a {
        color: #fff;
      }
    }
    .day {
      a {
        font-weight: bold;
        &:hover {
          color: #a30000;
        }
      }
    }
  }
}