adlurfm/yii2-fullcalendar-2
Composer 安装命令:
composer require adlurfm/yii2-fullcalendar-2
包简介
FullCalendar.io component in Yii2
README 文档
README
FullCalendar.io component for Yii2
Installation
$ php composer.phar require adlurfm/yii2-fullcalendar-2
or add
"adlurfm/yii2-fullcalendar-2": "dev-main"
to the require section of your composer.json file.
Usage
//View File <?= FullCalendar::widget([ 'id' => 'calendar', 'clientOptions' => [ 'initialDate' => date('Y-m-d'), 'timeZone'=>'Asia/Kuala_lumpur', 'weekNumbers' => true, 'selectable' => true, 'initialView' => 'timeGridWeek', 'events' =>Url::to(['site/events']), 'eventTimeFormat'=> [ // like '14:30' 'hour'=>'2-digit', 'minute'=>'2-digit', 'meridiem' => false, 'hour12'=> false ] ], ]); ?>
//Controller File - Return as JSON format public function actionEvents($start, $end) { \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; return [ [ 'title'=>'All Day Event', 'start'=>'2023-01-01' ], [ 'title'=>'Long Event', 'start'=>'2023-01-04', 'end'=>'2023-01-11' ], ]; //Read more about event at https://fullcalendar.io/docs/event-parsing }
Read more options at - fullcalendar.io
统计信息
- 总下载量: 113
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-18