Datetime winget on single page
Permalink
Hello. I'm trying to add datetime widget to single page like this:
The documentation says: When using the datetime() method, it creates multiple fields that must be combined using the translate() method. The save() method must be extended in the block controller to use translate().
In my single page controller i'm trying to get input data:
But $published_at variable is always equal to NULL.
So what's the difference between using datetime in block controller and single page controller?
And where i'm mistaken?
print Core::make( 'helper/form/date_time' )->datetime( 'published_at', $article['published_at'] );
The documentation says: When using the datetime() method, it creates multiple fields that must be combined using the translate() method. The save() method must be extended in the block controller to use translate().
In my single page controller i'm trying to get input data:
$published_at = Core::make('helper/form/date_time')->translate( $this->post('published_at') );
But $published_at variable is always equal to NULL.
So what's the difference between using datetime in block controller and single page controller?
And where i'm mistaken?
to this
And it by default checks the post and translates the date.