4 Star 8 Fork 5

想天浏览器 / timePicker

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

功能说明:

用于列表筛选时间或者选择时间,比原有的laydate组件上多了几个特定的时间供用户选择,如 今天,昨天,本月,上月。

同时还集成了js格式化时间插件moment.js,该组件还支持时间戳显示。

样式展示:

样式展示

html代码实例:

<input type="text" class="layui-input " name="" id="demo" value="" placeholder="">

js代码实例:

layui.config({
    base: '__STATIC__/admin/js/',
});
layui.use(['timePicker'],function () {
    var timePicker = layui.timePicker;
    timePicker.render({
        elem: '#demo', //定义输入框input对象
        options:{      //可选参数timeStamp,format
            timeStamp:false,//true开启时间戳 开启后format就不需要配置,false关闭时间戳 //默认false
            format:'YYYY-MM-DD',//格式化时间具体可以参考moment.js官网 默认是YYYY-MM-DD HH:ss:mm
        },
    });
     
})

Repository Comments ( 1 )

Sign in to post a comment

About

时间段选择器,可以选择常见的时间段,比较适合列表页做时间段的筛选。来自于OpenCenterV3项目中。 OC https://gitee.com/yhtt2020/OpenCenter expand collapse
JavaScript
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
JavaScript
1
https://gitee.com/tsbrowser/timePicker.git
git@gitee.com:tsbrowser/timePicker.git
tsbrowser
timePicker
timePicker
master

Search