tecnocen / yii2-fullcalendar
用于 Full Callendar JavaScript 日历的 Yii2 Widgets
0.1
2016-07-07 22:42 UTC
Requires
- bower-asset/fullcalendar: ~2.7
- omnilight/yii2-momentjs: *
- yiisoft/yii2: ~2.0.8
Requires (Dev)
- cebe/indent: *
- phpunit/phpunit: ~4.4
This package is auto-updated.
Last update: 2024-09-05 07:18:42 UTC
README
实现 fullcalendar 插件的 Yii2 Widgets
安装
首选安装此扩展的方式是通过 composer。
运行以下命令之一:
composer require --prefer-dist "tecnocen/yii2-fullcalendar:*"
或者将以下内容添加到 composer.json
文件的 require
部分:
"tecnocen/yii2-fullcalendar": "*"
to the require section of your composer.json file.
使用方法
日历
这是一个基本的小部件,它将插件封装到 yii\base\Widget
实现。
use tecnocen\fullcalendar\widgets\Fullcalendar; echo Fullcalendar::widget([ // 'lang' => 'es', 'options' => [ // HTML attributes for the container. // the `tag` option is specially handled as the HTML tag name ], 'clientOptions' => [ // JS Options to be passed to the `calendar()` plugin. // see http://fullcalendar.com/#Documentation/Options ], 'clientEvents' => [ // JS Events for the `calendar()` plugin. // see http://fullcalendar.com/#Documentation/Events ] ]);
语言
fullcalendar 插件提供了以下语言(https://github.com/fullcalendar/fullcalendar/tree/master/lang),Fullcalendar
和 ActiveCalendar
支持使用 $lang
类属性自动翻译,它将自动加载所需的 JS 文件并自定义插件调用。
echo Fullcalendar::widget([ 'options' => ['id' => 'es-calendar'], 'lang' => 'es', ]);
将添加 JS 文件 es.js
到视图中并运行
jQuery('#es-calendar').calendar({"lang":"es"});
ActiveFullCalendar
AjaxFullCalendar
在浏览器上。
文档
待办事项
许可证
BSD 许可证(BSD)。请参阅 许可证文件 以获取更多信息。