Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use app\assets\CalendarAsset;
- use yii\bootstrap\Modal;
- use yii\helpers\Html;
- use yii\grid\GridView;
- use yii\helpers\Url;
- /* @var $this yii\web\View */
- /* @var $searchModel app\models\EventsSearch */
- /* @var $dataProvider yii\data\ActiveDataProvider */
- $this->title = Yii::t('app', 'Calendar');
- $this->params['breadcrumbs'][] = $this->title;
- CalendarAsset::register($this);
- ?>
- <div class="events-index">
- <h1><?= Html::encode($this->title) ?></h1>
- <p>
- <?php
- Modal::begin([
- 'header' => '<h2>Create event</h2>',
- 'id' => 'crEvent',
- 'size' => 'modal-md'
- ]);
- echo '<div id="modalContent"></div>';
- Modal::end();
- ?>
- <?php
- Modal::begin([
- 'header' => '<h2>Edit event</h2>',
- 'id' => 'edEvent',
- 'size' => 'modal-md'
- ]);
- echo '<div id="modalContent"></div>';
- Modal::end();
- ?>
- </p>
- <?= \yii2fullcalendar\yii2fullcalendar::widget(array(
- 'clientOptions' => [
- 'height' => 770,
- 'editable' => true,
- // 'hiddenDays' => 7,
- 'minTime' => '08:00',
- 'maxTime' => '19:00',
- 'slotDuration' => '00:15:00',
- 'eventLimit' => true,
- 'allDaySlot' => false,
- 'timezone' => 'local',
- 'timeFormat' => 'HH:mm',
- 'lang' => 'uk',
- 'slotLabelFormat' => 'HH:mm',
- 'scrollTime' => '00:00:30'
- ],
- 'events'=> $events
- ));
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement