Merge pull request #46 from open-sausages/pulls/4.0/6626-remove-jquery-datepicker

Fixed DatetimeField API usage
This commit is contained in:
Damian Mooyman 2017-04-04 10:58:40 +12:00 committed by GitHub
commit 04fe1e5ee8

View File

@ -255,13 +255,6 @@ class TestSessionController extends Controller
new HiddenField('flush', null, 1) new HiddenField('flush', null, 1)
); );
$textfield->setAttribute('placeholder', 'Example: framework/tests/security/MemberTest.yml'); $textfield->setAttribute('placeholder', 'Example: framework/tests/security/MemberTest.yml');
$datetimeField->getDateField()
->setConfig('dateformat', 'yyyy-MM-dd')
->setConfig('showcalendar', true)
->setAttribute('placeholder', 'Date (yyyy-MM-dd)');
$datetimeField->getTimeField()
->setConfig('timeformat', 'HH:mm:ss')
->setAttribute('placeholder', 'Time (HH:mm:ss)');
$datetimeField->setValue((isset($testState->datetime) ? $testState->datetime : null)); $datetimeField->setValue((isset($testState->datetime) ? $testState->datetime : null));
$this->extend('updateBaseFields', $fields); $this->extend('updateBaseFields', $fields);