定制 matthew-p/yii2-working-date-time-widget 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

matthew-p/yii2-working-date-time-widget

最新稳定版本:1.0

Composer 安装命令:

composer require matthew-p/yii2-working-date-time-widget

包简介

Working day and time input widget for yii2.

README 文档

README

Input day/time/dinner widget

Installation

The preferred way to install this extension is through composer.

Sample

Either run

php composer.phar require --prefer-dist matthew-p/yii2-working-date-time-widget "*"

or add

"matthew-p/yii2-working-date-time-widget": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by:

<?= \MP\WorkingDatetime\WorkingDays::widget(['name' => 'example']); ?>

Options:

WorkingDays::widget([
    'name' => 'example',
    
    'roundTheClock' => '00.00 - 00.00', // Default - 00.00 - 00.00. Round-The-Clock value
    'enableDinner' => true,             // Default - true. Enable/disable dinner input
    
    'autocompleteDays' => [],           // Default - []. Automatic filling of time for the specified days
                                        // Example: [1,2,5] or ['monday', 'friday']
                                        // Warning: FILLS TIME FROM THE FILLED DAY
])

If you dynamic add widget to page, run (js):

MPWorkingDays.reInit(); // Set default settings only for NEW widgets

or

MPWorkingDays.reInit({newId: 'oldId'}); // Copy settings from previous widget

or

MPWorkingDays.reInit({newId: {settings...}}); // Set new widget settings

Set dynamicaly widget settings:

MPWorkingDays.addInputSettings(widgetID, {settings...});

Yii2 Model Required Validator:

/**
 * @inheritdoc
 */
public function rules()
{
    return [
        ['workday', WorkingDaysRequiredValidator::class]
    ];
}

统计信息

  • 总下载量: 992
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-10-23