Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simialbi/yii2-widget-yohours
yii2 widget to create osm opening_hours compatible data
https://github.com/simialbi/yii2-widget-yohours
jquery-plugin openinghours osm yii2-extension yii2-widgets yohours
Last synced: 26 days ago
JSON representation
yii2 widget to create osm opening_hours compatible data
- Host: GitHub
- URL: https://github.com/simialbi/yii2-widget-yohours
- Owner: simialbi
- License: mit
- Created: 2018-05-28T11:55:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-09-15T14:39:46.000Z (over 2 years ago)
- Last Synced: 2024-11-13T14:55:08.892Z (about 2 months ago)
- Topics: jquery-plugin, openinghours, osm, yii2-extension, yii2-widgets, yohours
- Language: PHP
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yii2-widget-yohours
This extension integrates an [OSM compatible Opening Hours widget](https://wiki.openstreetmap.org/wiki/Key:opening_hours)
into yii2 framework. It's based on [Adrien Pavie](https://github.com/PanierAvide)'s
[YoHours Application](http://projets.pavie.info/yohours/).A live demo is available at [projets.pavie.info/yohours](http://projets.pavie.info/yohours/).
## Resources
* [jQuery yohours plugin](https://github.com/simialbi/jquery-yohours)
* [yii2](https://github.com/yiisoft/yii2) framework
* [bootstrap 3 | 4 | 5](https://getbootstrap.com)## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
$ php composer.phar require --prefer-dist simialbi/yii2-widget-yohours
```or add
```
"simialbi/yii2-widget-yohours": "*"
```to the ```require``` section of your `composer.json`
## Example Usage
To include an yohours input field widget call the widget like this:
````php
'opening_hours',
'value' => $value,
// 'clientOptions' => [
// 'locale' => 'en',
// 'bootstrapVersion' => 'bootstrap4',
// 'height' => 600,
// 'delay' => 700
// ]
]);
// or model like usage
/* @var $form \yii\widgets\ActiveForm */
/* @var $model \yii\base\Model */
echo $form->field($model, 'opening_hours')->widget(YoHours::class, [
// 'clientOptions' => [
// 'locale' => 'en',
// 'bootstrapVersion' => 'bootstrap4',
// 'height' => 600,
// 'delay' => 700
// ]
]);
?>````
## License
**yii2-widget-yohours** is released under MIT license. See bundled [LICENSE](LICENSE) for details.