MUI DtPicker 显示自定义日期
2024-10-19 06:19:21
MUI地址:http://dev.dcloud.net.cn/mui/ 首先引入相关JS CSS脚本。
HTML代码:
<input class="dt flat" style="width:200px;" value='2018-05-16 19:00' type="text">
然后给class为dt增加JS事件
<script> $(".dt").on('tap', function () {
that = this;
var _init = $(that).val();
options = { "value": "" + _init + "", "customData": { "i": [{ "text": "00", "value": "00" }, { "text": "30", "value": "30" }] }, "labels": ["年", "月", "日", "时", "分"] };
var dtPicker = new mui.DtPicker(options)
dtPicker.show(function (rs) {
$(that).val(rs.text);
});
}); </script>
效果
最新文章
- Linux系统性能优化思路和方法
- Spring中文文档-第一部分
- android检测版本更新
- 公司内多个公众号实现账号互通(UnionID机制处理)
- Shell数组相关操作
- winform建立非矩形窗体
- projecteuler Sum square difference
- 00_ForTest
- 一些关于poi导入的样例
- mmc一维下料例子
- 异常分析:关于jsp页面使用jstl
- Reverse Integer 2015年6月23日
- 【动态规划】 EditDistance
- 【RL-TCPnet网络教程】第25章 DHCP动态主机配置协议基础知识
- CSS---内外边距
- vs2017如何设置类或函数前不显示引用的数量
- bootstrap 全局样式设置
- HDU 4496 D-City(逆向并查集)
- 找xpath好用的工具(Firefox插件)
- 内存映射函数remap_pfn_range学习——代码分析(3)
热门文章
- google 与服务器搭建
- hdu3642扫描线 长方体
- NBUT1457
- 性能测试二十四:环境部署之Redis多实例部署
- python 全栈开发,Day52(关于DOM操作的相关案例,JS中的面向对象,定时器,BOM,client、offset、scroll系列)
- C#中IEnumerable、ICollection、IList、IQueryable 、IQueryable 、List之间的区别
- Android Rom build.prop文件详解
- 注解工具ButterKnife用法和注意点
- python访问百度地图接口并返回信息
- .NetCore源码阅读笔记系列之Security (三) Authentication &; AddOpenIdConnect