Added default date entry value
This commit is contained in:
parent
6f65c067df
commit
d3d2ba1455
@ -83,12 +83,16 @@ class Posts
|
||||
public function entry()
|
||||
{
|
||||
if (Session::exists('userid')) {
|
||||
$date = new \DateTime();
|
||||
$now = $date->format("Y-m-d");
|
||||
|
||||
$categories = $this->post->showCategories();
|
||||
|
||||
$user = Session::get('userid');
|
||||
|
||||
View::render('Data/entry_pengumuman.html', [
|
||||
'categories' => $categories,
|
||||
'timestamp' => $now,
|
||||
'user' => $user,
|
||||
'token' => Token::generate()
|
||||
]);
|
||||
|
@ -16,12 +16,12 @@
|
||||
<br>
|
||||
|
||||
<label for="expired_at">Berlaku dari</label>
|
||||
<input type="date" name="valid_at" value="">
|
||||
<input type="date" name="valid_at" value="{{ timestamp }}">
|
||||
|
||||
<br>
|
||||
|
||||
<label for="expired_at">Berlaku sampai</label>
|
||||
<input type="date" name="expired_at" value="">
|
||||
<input type="date" name="expired_at" value="{{ timestamp }}">
|
||||
|
||||
<br>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user