public function actionChangedatesave()
{
$this->_assertPostOnly();// if you are not a super admin, you will get an error
if(!XenForo_Visitor::getInstance()->isSuperAdmin())
{
return;
}
$postId= $this->_input->filterSingle('post_id', XenForo_Input::UINT);//this is an integer here! I guess the easiest solution would be to use an integer value at first, before you know how you can make use of xenForos calendar for selecting a date.
$newPostDate = $this->_input->filterSingle('new_post_date', XenForo_Input::UINT);
$dw = XenForo_DataWriter::create('XenForo_DataWriter_Post');
$dw->setExistingData($postId);
$dw->set('date', $newPostDate);
$dw->save();
$post['post_id'] = $postId;
return $this->responseRedirect(
XenForo_ControllerResponse_Redirect::SUCCESS,
XenForo_Link::buildPublicLink('post', $post),
'Post Date Changed');
}