mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Allowing DatetimeField->saveInto() to save a partial array notation with missing 'time' value (from r107441)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112599 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
52bd0cc4bb
commit
e07d56096d
@ -91,8 +91,10 @@ class DatetimeField extends FormField {
|
||||
function dataValue() {
|
||||
$valDate = $this->dateField->dataValue();
|
||||
$valTime = $this->timeField->dataValue();
|
||||
|
||||
if($valDate && $valTime) {
|
||||
|
||||
// Only date is actually required, time is optional
|
||||
if($valDate) {
|
||||
if(!$valTime) $valTime = '00:00:00';
|
||||
return $valDate . ' ' . $valTime;
|
||||
} else {
|
||||
// TODO
|
||||
|
Loading…
Reference in New Issue
Block a user