laydatetime.html 764 B

123456789101112131415161718192021222324
  1. <style>
  2. .layui-laydate-footer span:hover {
  3. color: #387AFF;
  4. }
  5. .layui-laydate-footer span[lay-type=date] {
  6. color: #387AFF;
  7. }
  8. </style>
  9. {notempty name="title"}
  10. <span class="input-group-addon">{$title}</span>
  11. {/notempty}
  12. <input style="width: 250px!important;" class="form-control" id="laydate-{$name}" name="{$name}" type="text" value="{$val|default=''}" placeholder="{$placeholder|default='请选择'}" readonly/>
  13. <script>
  14. $(function () {
  15. laydate.render({
  16. elem: '#laydate-{$name}',
  17. type: "datetime",
  18. format: "{$format|default='yyyy-MM-dd HH:mm:ss'}", // yyyy-MM-dd HH:mm:ss
  19. trigger: 'click',
  20. theme: '#387AFF',
  21. range:true,
  22. });
  23. });
  24. </script>