Layui date control usage (example)

Release: 2019-11-29 13:44:43
forward
5265 people have browsed it

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>
Copy after login

Html:

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

JS:

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

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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!