<style>
    .layui-laydate-footer span:hover {
        color: #284a94;
    }
    .layui-laydate-footer span[lay-type=date] {
        color: #284a94;
    }
</style>
{notempty name="title"}
<span class="input-group-addon">{$title}</span>
{/notempty}
<input style="width: 250px!important;" class="form-control" id="laydate-{$name}" name="{$name}" type="text" value="{$val|default=''}" placeholder="{$placeholder|default='请选择'}" readonly/>
<script>
    $(function () {
        laydate.render({
            elem: '#laydate-{$name}',
            type: "datetime",
            format: "{$format|default='yyyy-MM-dd HH:mm:ss'}", // yyyy-MM-dd HH:mm:ss
            trigger: 'click',
            theme: '#387AFF',
            range:true,
        });
    });
</script>