jQuery幾種日期,時間選擇插件.

 一.使用bootstrap主題的jQuery日期選擇插件

創(chuàng)新互聯(lián)建站是專業(yè)的同安網(wǎng)站建設(shè)公司,同安接單;提供成都做網(wǎng)站、成都網(wǎng)站建設(shè),網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行同安網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊,希望更多企業(yè)前來合作!

bootstrap-datepicker.js

 

二.jQuery UI jQuery日期選擇插件

datepicker,集成在jquery-ui.js內(nèi).

http://api.jqueryui.com/datepicker/

 

三.擴(kuò)展了jQuery的datepicker插件,可以選擇時間

jquery-ui-timepicker-addon.js

要先導(dǎo)入jquery-ui.js

https://github.com/trentrichardson/jQuery-Timepicker-Addon

jQuery 幾種日期,時間選擇插件.

 

 

四.jquery-ui-timepicker-addon 用法

 

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link type="text/css" href="/static/app1/css/jquery-ui.css" rel="stylesheet"/>
    <link type="text/css" href="/static/app1/css/jquery-ui-timepicker-addon.css" rel="stylesheet"/>
    <script src="/static/app1/js/jquery-3.1.0.js"></script>
    <script type="text/javascript" src="/static/app1/js/jquery-ui.js"></script>
    <script type="text/javascript" src="/static/app1/js/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="/static/app1/js/jquery-ui-timepicker-zh-CN.js"></script>
</head>


<body>

<form>
    <input title="你好" id="timepicker" value="點(diǎn)擊彈出選擇框">
</form>


<script>

    var conf = {
        //buttonImageOnly: true,
        changeYeartrue,
        changeMonthtrue,
        selectOtherMonthsfalse,
        showSecondfalse,
        dateFormat'yy-mm-dd',
        timeFormat'HH:mm:ss',
        stepHour: 1,
        stepMinute: 1,
        hourMax: 20,
        hourMin: 9

    };
    $('#timepicker').datetimepicker(conf);


</script>
</body>
</html>

 

 

jquery-ui-timepicker-zh-CN.js 漢化新加了monthNamesShort和monthNames,

(function($) {
   $.timepicker.regional['zh-CN'] = {
      timeOnlyTitle'選擇時間',
      timeText'時間',
      hourText'小時',
      minuteText'分鐘',
      secondText'秒鐘',
      millisecText'毫秒',
      microsecText'微秒',
      timezoneText'時區(qū)',
      currentText'現(xiàn)在時間',
      closeText'確認(rèn)',
      timeFormat'HH:mm',
      timeSuffix'',
      amNames: ['AM''A'],
      pmNames: ['PM''P'],
      isRTLfalse,
      monthNamesShort: [ "01""02""03""04""05""06""07""08""09""10""11""12" ],
        monthNames: [ "01""02""03""04""05""06""07""08""09""10""11""12" ]
   };
   $.timepicker.setDefaults($.timepicker.regional['zh-CN']);
})(jQuery);

 

分享標(biāo)題:jQuery幾種日期,時間選擇插件.
轉(zhuǎn)載來于:http://muchs.cn/article38/iehssp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供用戶體驗(yàn)、網(wǎng)站制作、網(wǎng)站改版、標(biāo)簽優(yōu)化營銷型網(wǎng)站建設(shè)、網(wǎng)站收錄

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)頁設(shè)計公司