您好,欢迎访问一九零五行业门户网

jquery仿苹果的时间/日期选择效果实例分享

本文主要介绍了jquery仿苹果的时间/日期选择效果的实例,具有很好的参考价值。下面跟着小编一起来看下吧,希望能帮助到大家。
1.html文件,index.html
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>title</title> <script src="./jquery-1.12.4.min.js"></script> <script src="./pickdater.js"></script> <style> body{position: absolute;width: 100%;height: 100%} ul{list-style: none;margin: 0} </style> </head> <body> <input id="pickdater" style="font-size: 50px;"> </body> </html>
查看效果时候把浏览器调成手机模式
2.插件 链接地址:http://files.cnblogs.com/files/jiebba/pickdater.js ,
引用插件
3.调用插件
1.调用 日期
var opt={ starty:1990, //开始时间 endy:2050, //结束事件 mpickertype:1, separator:'/' //日期分割符 } $('#pickdater').mpickdater(opt);
2.调用 时间
var opt={ starty:1990, //开始时间 endy:2050, //结束事件 mpickertype:2, separator:'/' //日期分割符 } $('#pickdater').mpickdater(opt);
3.调用 日期和时间
var opt={ starty:1990, //开始时间 endy:2050, //结束事件 mpickertype:3, separator:'/' //日期分割符 } $('#pickdater').mpickdater(opt);
代码仅供参考,具体功能可以自己扩展。
相关推荐:
jquery编写日期选择器实例教程
jquery ui 日期选择器datepicker详解
如何开发一个微信小程序的日期选择器
以上就是jquery仿苹果的时间/日期选择效果实例分享的详细内容。
其它类似信息

推荐信息