2017 © Pedro Peláez
 

yii2-extension yii2-datetimepicker

Yii2 DateTimePicker Widget.

image

maddoger/yii2-datetimepicker

Yii2 DateTimePicker Widget.

  • Tuesday, May 22, 2018
  • by maddoger
  • Repository
  • 1 Watchers
  • 1 Stars
  • 136 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 1 % Grown

The README.md

Yii2 DateTimePicker and date format behavior

DateTimePicker widget is a wrapper of Bootstrap DatePicker for Yii 2 framework., (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist maddoger/yii2-datetimepicker "*"

or add, (*4)

"maddoger/yii2-datetimepicker": "*"

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

Usage

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

use maddoger\widgets\DateTimePicker;

echo $form->field($model, 'field')->widget(DateTimePicker::className());

Date Attribute

For datetime format and timezone conversation you can use DateTimeBehavior., (*7)

In model behaviors for timestamp field:, (*8)

[
    'class' => DateTimeBehavior::className(),
    'attributes' => ['published_at'],
    'originalFormat' => 'U', //original format
    'originalTimeZone' => 'UTC', //original timezone

    'timeZone' => 'Europe/London', //local timezone
    'format' => 'datetime', //local format, Formatter format
]

Now you can use published_at as original attribute and published_at_local as user read-write attribute., (*9)

For date fields:, (*10)

[
    'class' => DateTimeBehavior::className(),
    'attributes' => ['birth_date'],
    'originalFormat' => 'Y-m-d',
    'format' => 'date',
    'timeZone' => 'UTC',
]

The Versions

22/05 2018

dev-master

9999999-dev

Yii2 DateTimePicker Widget.

  Sources   Download

MIT

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

22/05 2018

v2.0.0

2.0.0.0

Yii2 DateTimePicker Widget.

  Sources   Download

MIT

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

12/02 2016

v1.5.2

1.5.2.0

Yii2 DateTimePicker Widget.

  Sources   Download

MIT

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

29/01 2016

v1.5.1

1.5.1.0

Yii2 DateTimePicker Widget.

  Sources   Download

MIT

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

29/10 2015

v1.5.0

1.5.0.0

Yii2 DateTimePicker Widget.

  Sources   Download

MIT

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

21/05 2015

v1.4.3

1.4.3.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

06/04 2015

v1.4.2

1.4.2.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

30/03 2015

v1.4.1

1.4.1.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

06/03 2015

v1.4.0

1.4.0.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

06/03 2015

v1.3.0

1.3.0.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

02/03 2015

v1.2.0

1.2.0.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

21/01 2015

v1.1.1

1.1.1.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

21/01 2015

v1.1.0

1.1.0.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget

09/11 2014

v1.0.0

1.0.0.0

Yii2 DateTimePicker Widget.

  Sources   Download

BSD-3-Clause

The Requires

 

by Vitaliy Syrchikov
by Jonathan Peterson

extension yii2 widget