Home > Web Front-end > JS Tutorial > body text

Example sharing of jquery imitating Apple's time/date selection effect

小云云
Release: 2018-01-23 09:31:59
Original
2548 people have browsed it

This article mainly introduces examples of time/date selection effects of jquery imitating Apple, which has a good reference value. Let's take a look with the editor below, I hope it can help everyone.

1.html file, 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>
Copy after login

Switch the browser to mobile mode when viewing the effect

2. Plug-in link address: http://files.cnblogs.com/files/jiebba/pickDater.js ,

Quote plug-in

3. Call plug-in

1. Call date


##

var opt={
 startY:1990, //开始时间
 endY:2050, //结束事件
 mPickerType:1, 
 separator:&#39;/&#39; //日期分割符
 }
 $(&#39;#pickDater&#39;).mPickDater(opt);
Copy after login

2. Calling time


var opt={
 startY:1990, //开始时间
 endY:2050, //结束事件
 mPickerType:2,
 separator:&#39;/&#39; //日期分割符
 }
 $(&#39;#pickDater&#39;).mPickDater(opt);
Copy after login

3. Calling date and time

##

var opt={
 startY:1990, //开始时间
 endY:2050, //结束事件
 mPickerType:3,
 separator:&#39;/&#39; //日期分割符
 }
 $(&#39;#pickDater&#39;).mPickDater(opt);
Copy after login

The code is for reference only, specific functions can be expanded by yourself.

Related recommendations:


jquery writing date picker example tutorial

jQuery UI date picker Datepicker detailed explanation

How to develop a date picker for a WeChat applet

The above is the detailed content of Example sharing of jquery imitating Apple's time/date selection effect. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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