插件引入文件:

<meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="stylesheet"  href="jquery.mobile-git.css" />
    <link rel="stylesheet" href="jquery.mobile.datepicker.css" />
    <link rel="stylesheet" href="jquery.mobile.datepicker.theme.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="external/jquery-ui/datepicker.js"></script>
    <script src="jquery.mobile-git.js"></script>
    <script src="jquery.mobile.datepicker.js"></script>
    <!--简体中文-->
    <script src="datepicker-zh-CN.js"></script>
     <!--隐藏日期控件输入框-->
     <style>       
        .ui-input-text{display:none;} 
    </style>

js部分:获取选择的日期:

//默认日期格式
        var currentDateOjb =$("#datepicker").datepicker();//得到日期对象
        currentDate=currentDateObj.val()//日期字符串
       alert(currentDate);

//指定日期格式
        var date= $("#datepicker").datepicker({ dateFormat: "yy-mm-dd" }).val()
        alert(date);

html部分:

<input type="text" id="datepicker"  data-inline="true" data-role="date" />

推荐:http://codego.net/77722/

附录:

datepicker-zh-CN.js内容:
/* Chinese initialisation for the jQuery UI date picker plugin. */
/* Written by Cloudream (cloudream@gmail.com). */
(function( factory ) {
    if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
        define([ "../widgets/datepicker" ], factory );
    } else {

// Browser globals
        factory( jQuery.datepicker );
    }
}(function( datepicker ) {

datepicker.regional['zh-CN'] = {
    closeText: '关闭',
    prevText: '<上月',
    nextText: '下月>',
    currentText: '今天',
    monthNames: ['一月','二月','三月','四月','五月','六月',
    '七月','八月','九月','十月','十一月','十二月'],
    monthNamesShort: ['一月','二月','三月','四月','五月','六月',
    '七月','八月','九月','十月','十一月','十二月'],
    dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
    dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
    dayNamesMin: ['日','一','二','三','四','五','六'],
    weekHeader: '周',
    dateFormat: 'yy-mm-dd',
    firstDay: 1,
    isRTL: false,
    showMonthAfterYear: true,
    yearSuffix: '年'};
datepicker.setDefaults(datepicker.regional['zh-CN']);

return datepicker.regional['zh-CN'];

}));

jQuery Mobile Datepicker 使用的更多相关文章

  1. jquery mobile datepicker

    1.http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/ 这个只能用在iOS和PC上,使用<input date,An ...

  2. jQuery Mobile入门

    转:http://www.cnblogs.com/linjiqin/archive/2011/07/17/2108896.html 简介:jQuery Mobile框架可以轻松的帮助我们实现非常好看的 ...

  3. 解决Jquery mobile点击较长文本body的时候Header和footer会渐入渐出的问题

         在做一个Phonegap+Jqm工程的时候,出现了如题的问题,相信很多人都遇到过Jquerymobile点击body时候header和footer会闪烁的显示和隐藏问题,fixed却并不能真 ...

  4. jquery mobile 问问多多

    jquery mobile  问题多多,兼容性太差.android4.1下完全崩溃.以后再也不用jquery mobile了

  5. jQuery UI Datepicker使用介绍

    本博客使用Markdown编辑器编写 在企业级web开发过程中,日历控件和图表控件是使用最多的2中第三方组件.jQuery UI带的Datepicker,日历控件能满足大多数场景开发需要.本文就主要讨 ...

  6. jquery.mobile手机网页简要

    先上最终效果: 最近做了一个用手机浏览器访问的web应用,采用较流行的HTML5,为了提高开发效率节省时间决定采用现有开源框架,免去了自己做设计与兼容性. 一些比较优秀的框架:10大优秀的移动Web应 ...

  7. jQuery Mobile案例,最近用Moon.Web和Moon.Orm做了一套系统

      一.简介 先说说,我们的主题.jQuery Mobile,最近用Moon.Web和Moon.Orm做了一套系统 jQuery Mobile是jQuery 在手机上和平板设备上的版本.jQuery ...

  8. JQuery mobile中按钮自定义属性的改变

    1..ui-mobile-viewport是jquery mobile默认给body加的class,这样的话包含选择符优先级高一点 <style> .ui-mobile-viewport ...

  9. JQuery Mobile 页面参数传递

    在单页模版中使用基于HTTP的方式通过POST和GET请求传递参数,而在多页模版中不需要与服务器进行通信,通常在多页模版中有以下三种方法来实现页面间的参数传递. 1.GET方式:在前一个页面生成参数并 ...

随机推荐

  1. ubuntu下查找某个文件的路径

    参考:ubuntu下如何查找某个文件的路径      http://blog.csdn.net/lieyanhaipo/article/details/17055667 在Ubuntu有时候会遇到记得 ...

  2. JQ引用

    <script type="text/javascript" src="http://files.cnblogs.com/914556495wxkj/jquery- ...

  3. C++中Cstring、wstring 和string互相转换总结

    通过前一篇文章<C++中string,wstring,CString的基本概念和用法>,对Cstring.wstring 和string有了一个了解.string是C++提供的标准字符串操 ...

  4. C++实现VPN工具之VPN错误代码大全

    该篇文章转自:<VPN问题全攻略>http://home.51.com/h012359/diary/item/10008457.html 以下是使用VPN版软件中常见的一些错误代码: 1. ...

  5. VIM常用操作总结

    VIM常用的模式网上说法不太一样,但是大同小异,这里大致分一下,便于后面总结 1.一般模式 默认打开文件后的模式,这个时候只能移动光标,不能编辑 2.输入模式 一般模式按下i,就可以进入输入模式,输入 ...

  6. codeforces 496A. Minimum Difficulty 解题报告

    题目链接:http://codeforces.com/contest/496/problem/A 题目意思:给出有 n 个数的序列,然后通过删除除了第一个数和最后一个数的任意一个位置的数,求出删除这个 ...

  7. git remote 相关用法

    为了便于管理,Git要求每个远程主机都必须指定一个主机名.git remote  命令就用于管理主机名. 不带选项的时候,git remote命令列出所有远程主机. $ git remote orig ...

  8. 【leetcode】Sort Colors(middle)☆

    Given an array with n objects colored red, white or blue, sort them so that objects of the same colo ...

  9. 【编程题目】n 个数字(0,1,…,n-1)形成一个圆圈,从数字 0 开始

    第 18 题(数组):题目:n 个数字(0,1,…,n-1)形成一个圆圈,从数字 0 开始,每次从这个圆圈中删除第 m 个数字(第一个为当前数字本身,第二个为当前数字的下一个数字).当一个数字删除后, ...

  10. mac系统下如何解压.car文件

    纯手打: 1.去github下载demo然后运行  github地址:https://github.com/steventroughtonsmith/cartool 2.找到项目下cartool的位置 ...