PHP code example of silverstripe / timepickerfield

1. Go to this page and download the library: Download silverstripe/timepickerfield library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

silverstripe / timepickerfield example snippets


TimePickerField::create('Time');

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

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

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