Datepager demo
Showing 1-10 of 10 items.
# | Start | Title |
---|---|---|
1 | 2008/01/01 | Yii project started |
2 | 2008/01/22 | HTML5 first proposed |
3 | 2008/02/15 | GitHub starts |
4 | 2008/08/18 | Registration of bitcoin.org |
5 | 2008/09/15 | Stack Overflow launched |
6 | 2008/09/23 | Android 1.0 released |
7 | 2008/10/22 | First Android mobile phone |
8 | 2008/11/21 | Conficker worm detected |
9 | 2008/11/27 | MySQL 5.1 launched |
10 | 2008/12/03 | Yii 1.0 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', ], ]); ?>