PHP code example of brilik / calendar
1. Go to this page and download the library: Download brilik/calendar library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
brilik / calendar example snippets
use VitoBryliano\Calendar\TailWindCalendar;
use VitoBryliano\Calendar\BootstrapCalendar;
// Get date in ISO format
$date = Carbon::now()->tz('Europe/Kiev')->format('Y-m-d');
// You can create calendar in the Bootstrap styles
$calendar = new BootstrapCalendar($date);
// Or you can create calendar in the TailWind styles
$calendar = new TailWindCalendar($date);
// You can add navigate for choose month
$calendar->navigation = true;
// You can add custom name months or their translations
$calendar->setWeekDaysName([
__('Mon'),
__('Tue'),
__('Wed'),
__('Thu'),
__('Fri'),
__('Sut'),
__('Sun')
]);