Datepager demo
Showing 1-7 of 7 items.
# | Start | Title |
---|---|---|
1 | 2006/01/10 | MacBook Pro released |
2 | 2006/03/09 | Google Docs introduced |
3 | 2006/03/21 | Twitter founded |
4 | 2006/07/11 | Support Windows 95 and 98 stops |
5 | 2006/08/26 | jQuery released |
6 | 2006/10/09 | Google acquires YouTube |
7 | 2006/11/30 | Windows Vista released |
Yii2 Datepager lets you do paging on date values in the Yii framework 2.0. On this page it is shown in it's default operation, 'out of the box'.
The data used are the same as those from my Dateline-demo.
Code<?php use sjaakp\datepager\ActiveDataProvider; use sjaakp\datepager\DatePager; $query = Event::find()->orderBy('start'); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'dateAttribute' => 'start', ]); ?> <?= DatePager::widget([ 'dataProvider' => $dataProvider, ]) ?> <?= GridView::widget([ 'dataProvider' => $dataProvider, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'start:date', 'title', ], ]); ?>