Home  >  Article  >  Web Front-end  >  Layui date control usage (example)

Layui date control usage (example)

尚
forward
2019-11-29 13:44:435305browse

Layui date control usage (example)

1. Introduction to layui:

layui is a front-end UI framework written using its own module specifications. It is an open source modular front-end UI framework that is different from those based on MVVM. The underlying UI framework.

Advantages: native development mode, modularity, strong compatibility

layui can be used as a quick development solution for the PC web-side backend system and front-end interface

For more layui knowledge, please Pay attention to the layui usage tutorial column.

2. Example of using layui date control

Introducing Layui:

    <link href="~/Content/layui/css/layui.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-3.3.1.min.js"></script>
    <script src="~/Content/layui/layui.js"></script>

Html:

<div class="layui-input-inline">
      <input id="start" class="layui-input" name="start" placeholder="开始时间"/>
 </div>

JS:

layui.use(&#39;laydate&#39;, function () {
     var laydate = layui.laydate;
     //执行一个laydate实例
      laydate.render({
        elem: &#39;#start&#39; //指定元素
      });
});

Achievement effect:

Layui date control usage (example)

The above is the detailed content of Layui date control usage (example). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete