Not a bug DateTime not parse after insert element


Formerly Nobita.Kun
Hi. This is more steps but i will give it now.

In php i return an HTML date by call like this.

$datetimeHtml = XenForo_Template_Helper_Core::dateTime(
    XenForo_Application::$time, 'html'

return json_encode('datetimeHtml' => $datetimeHtml);
Then in js I have do this.

$(ajaxData.datetimeHtml).xfInsert('appendTo', $container);
The result show full time. Eg: Aug 27, 2015 at 6:55 PM. It should show A few seconds.


XenForo developer
Staff member
Activation of the JS handlers, including the timestamp handler, is based on descendants of the element(s) being inserted. If you're inserting that directly, you'll need to activate it manually (likely via the parent).