Datepager demo
Showing 1-8 of 8 items.
# | Start | Title |
---|---|---|
1 | 2004/02/04 | Facebook founded |
2 | 2004/02/25 | CSS2.1 becomes candidate recommendation |
3 | 2004/04/01 | Google Gmail launched |
4 | 2004/06/15 | First computer worm targeted at mobile phones |
5 | 2004/07/13 | PHP 5.0 released |
6 | 2004/08/19 | Google goes public |
7 | 2004/11/09 | Firefox introduced |
8 | 2004/12/13 | David Wheeler dies |
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', ], ]); ?>