Home JS special effects time date Mobile phone sliding date and time selection plug-in mdatetimer

Mobile phone sliding date and time selection plug-in mdatetimer

Mobile phone sliding date and time selection plug-in mdatetimer

Mobile phone sliding date and time selection plug-in mdatetimer

The mobile phone sliding date and time selection plug-in mdatetimer is a mobile phone date selection code implemented based on the iscroll sliding plug-in. It supports setting the date format, specifying the year, time selection mode, etc.

JS code

<script src =“zepto.js”> </ script>
<script src =“zepto.mdatetimer.js”> </ script>
<style>
 体,UL,H1,H2,H3 { 
 保证金:0;
 填充:0; 
 font-family:“microsoft yahei”;
 }
UL {
 list-style-type:none; 
} 
一个{
 文字装饰:无; 
} 
输入{ 
 width:90%; height:30px; margin:20px auto; display:block; text-align:center; 
}
</style>

</ HEAD>

<BODY>

<input type="text" id="picktime" placeholder="Click to select date" readonly>

<SCRIPT>
 $(函数(){
 $( '#picktime')。mdatetimer({ 
 模式:3,//时间选择器模式:1:年月日,2:年月日时分(24小时),3:年月日时分 
 格式:2,//时间格式化方式:1:2015年06月10日17时30分46秒,2:2015-05-10 17:30:46默认:2 
 年份:[2000,2010,2011,2012,2013,2014,2015,2016,2017],//年份数组 
 nowbtn:true,//是否显示现在按钮 
 onOk:function(){ 
 //警报( 'OK');
 },//点击确定时添加额外的执行函数默认null 
 onCancel:function(){ 
 警报( 'www.sucaijiayuan.com');
 },//点击取消时添加额外的执行函数默认null }); 
 }); 
</ SCRIPT>

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

PHP date and time, PHP date and time_PHP tutorial PHP date and time, PHP date and time_PHP tutorial

12 Jul 2016

PHP date and time, PHP date time. PHP date and time, PHP date and time 1. date string date ( string $format [, int $timestamp ] ) echo date('Y') . 'br/';// 2016 echo date('y') . 'br /';// 16 echo '------br/'; echo

How to modify the time in linux How to modify the time in linux

06 Jun 2019

Linux time modification commands: 1. date command: view the current time; 2. date -s hours, minutes and seconds: modify the time; 3. date -s complete date and time (YYYY-MM-DD hh:mm[:ss]): modify the date ,time.

php generate age based on date of birth php generate age based on date of birth

23 Nov 2016

&lt;?php $birthday = '1985-02-01'; $age = date('Y', time()) - date('Y', strtotime($birthday)) - 1; if (date('m', time()) == date('m', strtotime($birthday))){ if (date('d', time()) &gt; date('d ...

How to convert time format in php How to convert time format in php

03 Nov 2020

How to convert time format in PHP: You can use date function to convert time format, such as [$y=date("Y",time()); $m=date("m",time()); $d=date ("d",time());].

php generate age based on date of birth php generate age based on date of birth

24 Nov 2016

"&lt;?php $birthday = '1985-02-01'; $age = date('Y', time()) - date('Y', strtotime($birthday)) - 1; if (date('m', time()) == date('m', strtotime($birthday))){ if (date('d', time()) &gt; date('d ...

The difference between php date and gmdate in obtaining date_PHP tutorial The difference between php date and gmdate in obtaining date_PHP tutorial

21 Jul 2016

The difference between php date and gmdate in getting the date. date -- Format a local time/date gmdate -- Format a GMT/UTC date/time, returning Greenwich Mean Time (GMT). For example, our current time zone

Space-time warping of Yii framework: timestamp, date and time processing Space-time warping of Yii framework: timestamp, date and time processing

26 Mar 2024

A timestamp is an integer representing the number of seconds since epoch time (Unix epoch, midnight UTC on January 1, 1970). Yii provides a convenient method to obtain and use timestamps: time(): returns the current timestamp. date(&quot;U&quot;): Returns the current timestamp in string format. strtotime(): Convert date/time string to timestamp. Date and Time Yii provides some classes to handle date and time data: Date: represents a date. Time: represents a time. DateTime: represents a date and time. These classes provide methods for creating, formatting, comparing, and converting date/time values. Formatting Dates and Times To format date/time values ​​as words

What are the date types in mysql? What are the date types in mysql?

19 Jul 2023

MySQL date types include DATE, TIME, DATETIME, TIMESTAMP, and YEAR. Detailed introduction: 1. DATE, used to store dates, can only store dates, not the time part; 2. TIME, used to store time, the format is only able to store time, not the date part; 3. DATETIME, used to store Date and time, which can store date and time parts, accurate to seconds; 4. TIMESTAMP, used to store date and time; 5. YEAR, used to store years, etc.

PHP time processing PHP time processing

11 Jun 2018

date_default_timezone_set('Asia/Shanghai'); //Set time zone 1. Format time function date, return string @params String date(string param1,intparam1,inttime)1.date function (compare printf, sprintf function) date('time Format '[,'timestamp']); date('Y-m-01',time())...

See all articles See all articles