Code Monkey home page Code Monkey logo

appdatefield's Introduction

这个一个移动设备日期选择组件

组件基于jQuery和jQuery Touch

实例:

	
	/**
	 * 创建日期选择组件实例
	 * @param  'date' // data为输入框的id值
	 * this.currDate // 获取当前返回的日期数组 [2014, 7, 7]
	 * this.getCurrentDate(0,0,0) // 获取指定的日期,如果参数为0,则返回当前对应的值
	 */
	var appDateField = new APPDateField('date', {

	    isCN: true,       //是否显示中文, 如: " 2014年4月1日 "
	    commer: '/',      //期间之间的间隔符, 默认为 "/",当 isCN为 true时, 这个设置失效
	    showYear: true,   //是否显示年份, 默认为显示 (true)
	    showMonth: true,  //是否显示月份, 默认为显示 (true)
	    showDate: true,   //是否显示日, 默认为显示 (true)
	    showTime: true,     //是否组件为时间选择,true:'16:20:25' 如果isCN为true,则:"16时20分25秒".这个开启建议将isCN设置为false
	    complate: function(evt){  // "完成"按钮触发事件
	        console.log(this)
	        console.log(this.getCurrentDate(0,0,0));
	        console.log(this.currDate);
	        //alert(999)
	    },
	    cancel: function(evt){  // "取消"按钮触发事件
	        console.log('Cancel---');
	    }

	});

appdatefield's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.