Properly fix date-timeonly js side to return a timestamp as all date widgets, server side converts it to expected format, same as others.

This commit is contained in:
Nathan Gray 2013-08-26 17:04:43 +00:00
parent 3b65d807ba
commit 838966ae9e
2 changed files with 2 additions and 10 deletions

View File

@ -91,7 +91,6 @@ class etemplate_widget_date extends etemplate_widget_transformer
{
$valid = (int)$value;
}
// string with formatting letters like for php's date() method
elseif (($valid = date($this->attrs['dataformat'], $value)))
{

View File

@ -202,15 +202,8 @@ var et2_date = et2_inputWidget.extend(
// User blanked the box
return null;
}
if(this._type == "date-timeonly")
{
return this.input_date.val();
}
else
{
// Convert to timestamp
return Math.round(this.date.valueOf() / 1000);
}
// Convert to timestamp
return Math.round(this.date.valueOf() / 1000);
}
});
et2_register_widget(et2_date, ["date", "date-time", "date-timeonly"]);