brilik/calendar

显示日历,并支持添加事件,适用于流行的框架(Bootstrap、TailWinds等)。

v1.0.0 2023-08-06 13:54 UTC

This package is auto-updated.

Last update: 2024-09-06 16:32:42 UTC


README

显示日历,并支持添加事件,适用于流行的框架(Bootstrap、TailWinds等)。

Latest Version on Packagist Build Status Quality Score Total Downloads

要求

  • PHP 7.3+

安装

您可以通过composer安装此包

composer require brilik/calendar

工作原理

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')
]);

变更日志

请参阅 变更日志 了解最近更改的详细信息。

许可协议

MIT许可协议(MIT)。请参阅 许可文件 获取更多信息。