Upgrade to rc5
This commit is contained in:
16
kirby/config/fields/mixins/datetime.php
Executable file
16
kirby/config/fields/mixins/datetime.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'methods' => [
|
||||
'toDatetime' => function ($value, string $format = 'Y-m-d H:i:s') {
|
||||
if ($timestamp = timestamp($value, $this->step)) {
|
||||
return $this->toISO($timestamp, $format);
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
'toISO' => function (int $time, string $format = 'Y-m-d H:i:s') {
|
||||
return date($format, $time);
|
||||
}
|
||||
]
|
||||
];
|
@@ -30,7 +30,7 @@ return [
|
||||
'template' => $template
|
||||
]);
|
||||
|
||||
$uploads['accept'] = $file->blueprint()->accept()['mime'] ?? '*';
|
||||
$uploads['accept'] = $file->blueprint()->acceptMime();
|
||||
} else {
|
||||
$uploads['accept'] = '*';
|
||||
}
|
||||
|
Reference in New Issue
Block a user