2017 © Pedro Peláez
 

library time-select

Provides a SelectType containing a selection of possible time values, from 00:00 to 23:45.

image

cethyworks/time-select

Provides a SelectType containing a selection of possible time values, from 00:00 to 23:45.

  • Tuesday, February 6, 2018
  • by Cethy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 282 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Cethyworks\TimeSelect

Provides a SelectType containing a selection of possible time values, from 00:00 to 23:45 (with a default 15 minutes step)., (*1)

CircleCI, (*2)

How to use

namespace ExampleBundle\Form;

use Cethyworks\TimeSelect\Form\TimeSelectType;

class ExampleType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('exampleTime', TimeSelectType::class)
            // ...
        ;
    }
    // ...
}

Options

Change the input' starting value

Overrides the choices array :, (*3)

// ...
public function buildForm(FormBuilderInterface $builder, array $options)
{

    $builder
        ->add('exampleTime', TimeSelectType::class, [
            'choices' => TimeSelectType::generateChoices(8, 45, 5, 2),
        )
        // ...
    ;
}
// ...

In this example, the input will start at 8:45 (and end at 8:30), with a 5 minutes step and a 2 hours step., (*4)

The Versions

06/02 2018

dev-master

9999999-dev

Provides a SelectType containing a selection of possible time values, from 00:00 to 23:45.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Charles-Elie

06/02 2018

v0.3

0.3.0.0

Provides a SelectType containing a selection of possible time values, from 00:00 to 23:45.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Charles-Elie

31/10 2017

v0.2

0.2.0.0

Provides a SelectType containing a selection of possible time values, from 00:00 to 23:45.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Charles-Elie

06/07 2017

v0.1

0.1.0.0

Provides a SelectType containing a selection of possible time values, from 00:00 to 23:45.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Charles-Elie