silverstripe/timepickerfield

There is no license information available for the latest version (1.1.0) of this package.

A time picker field for SilverStripe based on the jQuery UI Timepicker By François Gélinas http://fgelinas.com/code/timepicker/

Installs: 41 224

Dependents: 3

Suggesters: 0

Security: 0

Stars: 17

Watchers: 3

Forks: 6

Open Issues: 1

Type:silverstripe-vendormodule

1.1.0 2017-05-04 00:32 UTC

This package is auto-updated.

Last update: 2020-05-08 01:36:10 UTC


README

A time picker field based on jQuery UI Timepicker By François Gélinas http://fgelinas.com/code/timepicker/

Requirements

SilverStripe 4 (see previous releases for SS3 compat)

Usage

TimePickerField::create('Time');

You can set any of the configurations by using:

TimePickerField::create('Time')->setTimePickerConfig($key, $value);

If you need to modify an existing DatetimeField, you can set the time field to a picker by using:

$field = DatetimeField::create('DateAndTime');
$field->setField(
    'DateAndTime',
    TimePickerField::create('DateAndTime[time]')
        ->setTitle('DateAndTime')
);

Or if you like you can also use the following to create a DateTimePickerField from scratch:

$field = DatetimePickerField::create('DateAndTime');