插件引入文件:

<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. 【GoLang】panic defer recover 深入理解

    唉,只能说C程序员可以接受go的错误设计,相比java来说这个设计真的很差劲! 我认为知乎上说的比较中肯的: 1. The key lesson, however, is that errors ar ...

  2. FastReport 使用说明

    FastReport TfrxReport 此为最主要的报表元件,一个 TfrxReport 元件组成一份报表.在设计时期,双击此 元件可打开报表设计器(Report Designer),此元件拥有所 ...

  3. 8.SpringMVC参数传递

    页面参数传递到controller, 可被同名(与页面标签上的name名对应)的参数接收,用request设值,页面再取出来. 注意乱码解决办法: ①如果是get提交,则在tomcat的server. ...

  4. ABAP 数值类型转换

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'       EXPORTING         input  = wa_zz-werks       IMPOR ...

  5. java基础学习04(数组与方法)

    数组与方法 一.完成的目标 1. 掌握数组的定义.使用方法.引用传递 2. 掌握方法及其方法的重载 3. 使用方法接收和返回一个数组 4. java新特性对数组的操作支持 二.数组的定义和使用 数组是 ...

  6. Effective C++ -----条款10: 令operator=返回一个reference to *this

    比如: Widget& operator=(const Widget& rhs) { ... return* this; } 令赋值(assignment)操作符返回一个referen ...

  7. hiho一下第二周 Trie树

    题目链接:http://hihocoder.com/problemset/problem/1014 #include <iostream> #include <cstdio> ...

  8. 【数据结构】book3_3 表达式求值

    #include<iostream> #include <stdlib.h> using namespace std; typedef int Status; ; ; ; ; ...

  9. August 19th 2016 Week 34th Friday

    Friends are not the people you meet at the top, they are the people who were with you at the bottom. ...

  10. C语言文件操作相关函数

    在实际应用中,我们往往需要对文件进行操作,下面我将介绍C语言的一些关于操作文件的函数. 一.计算机文件 计算机文件是以计算机硬盘为载体存储在计算机上的信息集合,是存储在某种长期储存设备上的一段数据流. ...