2017 © Pedro Peláez
 

yii2-extension yii2-working-date-time-widget

Working day and time input widget for yii2.

image

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

Working day and time input widget for yii2.

  • Thursday, January 4, 2018
  • by hellboymxb@gmail.com
  • Repository
  • 1 Watchers
  • 0 Stars
  • 251 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 15 % Grown

The README.md

DayDateTime Widget for Yii2

Input day/time/dinner widget, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Sample, (*3)

Either run, (*4)

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

or add, (*5)

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

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code by:, (*7)

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

Options:, (*8)

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):, (*9)

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

or, (*10)

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

or, (*11)

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

Set dynamicaly widget settings:, (*12)

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

Yii2 Model Required Validator:, (*13)

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

The Versions

04/01 2018

dev-master

9999999-dev

Working day and time input widget for yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

by Matthew Patell

extension yii2 widget time datetime day working dinner

04/01 2018

1.0

1.0.0.0

Working day and time input widget for yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

by Matthew Patell

extension yii2 widget time datetime day working dinner