fcovasquez / yii2-countdown
jQuery countdown widget for Yii2
Installs: 48
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 5
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/jquery.countdown: *
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-21 11:26:32 UTC
README
This is a modified version of russ666/yii2-countdown.
Includes additional config parameters for widget initialization.
Installation
download
Download latest version
composer
add this line to your composer.json
"fcovasquez/yii2-countdown": "*"
Usage
echo \fcovasquez\widgets\Countdown::widget([ 'datetime' => date('Y-m-d H:i:s', time() + 1000), 'config' => ['elapse' => true, 'precision' => , 'defer' => false,], 'format' => '%M:%S', 'events' => [ 'finish' => 'function(){location.reload()}', ], ])
Params
datetime
Datetime string to countdown. Must be added with timezone, to prevent client-server timezone difference issue.
config
Configuration object for widget (http://hilios.github.io/jQuery.countdown/documentation.html#introduction)
events
Widget events (http://hilios.github.io/jQuery.countdown/documentation.html#events)
Plugin pages
Homepage - http://hilios.github.io/jQuery.countdown