TP3.2 日期默认格式

<input type="text" id="create_time" name="create_time" required="" autocomplete="off" class="layui-input" value="{$result['create_time']?$result['create_time']|date='Y-m-d',###:''}">

用三元运算符,且必须用方括号的方式。

如果没有,就不展示日期。

如果有,则转换成日期的格式。

原文地址:https://www.cnblogs.com/jiqing9006/p/11865389.html