mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Fix non-integer date check
This commit is contained in:
parent
df9f42ba3a
commit
d37beb2def
@ -48,12 +48,12 @@ class etemplate_widget_date extends etemplate_widget_transformer
|
||||
*/
|
||||
public function beforeSendToClient($cname)
|
||||
{
|
||||
if (!empty($this->attrs['dataformat'])) // Non-integer timestamp
|
||||
$form_name = self::form_name($cname, $this->id);
|
||||
$value =& self::get_array(self::$request->content, $form_name, true);
|
||||
if ($value && !empty($this->attrs['dataformat'])) // Non-integer timestamp
|
||||
{
|
||||
$form_name = self::form_name($cname, $this->id);
|
||||
$value =& self::get_array(self::$request->content, $form_name, true);
|
||||
$date = DateTime::createFromFormat($this->attrs['dataformat'], $value);
|
||||
$value = $date->getTimestamp();
|
||||
if($date) $value = $date->getTimestamp();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user