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:
Ingo Schommer 2010-10-15 03:51:21 +00:00
parent 52bd0cc4bb
commit e07d56096d

View File

@ -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