我正在尝试在表单中为我的本地日期时间输入输入一个值,但没有显示。我正在从数据库中获取的 php 变量中获取我的值。这是我的代码:
foreach ($result as $row) {
$desc = substr($row['description'], 0, 200);
$id = $row['id'];
$nextrun = date('Y-m-d H:i:s', strtotime($row['nextrun']));
<div class="modal fade" id="edit<?php echo $id;?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="col-sm-10">
<input class="form-control" type="datetime-local" value="<?php echo $nextrun; ?>" name="TaskNextRun" required>
</div>
</div>
我已经简化了我的代码让你看到基本的所以当我打开我的更新模式时,日期输入什么都没有出现

我做错了什么?
谢谢你的帮助