zoukankan      html  css  js  c++  java
  • jQuery DatePicker dateFormat日期格式

    <script type="text/javascript">
          $(function(){
            //设定日期选择器的相关属性
            var pickerOpts = {
             changeMonth: true,
             changeYear: true,
             dateFormat: "DD MM yy"
            };

            //创建日期选择器
            $("#date").datepicker(pickerOpts);
          });
        </script>

    这里的dateFornat:
    y        年(两位数字)
    yy      年(四位数字)
    M      月简写
    MM   完整月名
    m      年中月份序号(只需要一位数字时)
    mm   年中月份序号(需要两位数字时)
    d      一个月中日的序号(只需要一位数字时)
    dd    一个月中日的序号(需要两位数字时)
    D      星期几的简称
    DD   星期几的全程

    dateFormat: "d MM yy 'ddd'" 此法可以在添加的日期中增加字符窜。

    我的 pickOpts:
       changeMonth: true,
       changeYear: true,
       dateFormat: "yy mm dd",
       dayNamesMin:["一","二","三","四","五","六","日"],
       firstDay: 0,
       nextText: "下一月",
       prevText: "上一月",
       closeText: "关闭",
       currentText: "今天",
        monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
        isRTL: false,
        showButtonPanel: true,
        yearRange: "-25:+25"

  • 相关阅读:
    pyhton 线程锁
    python 守护线程
    python 线程
    python 判断文件的字符编码
    python 进程管道
    python 进程池
    webpack学习(一)起步安装
    最近特别喜欢的一首歌
    你真的了解回流和重绘吗?
    你了解SEO中的时效性吗?
  • 原文地址:https://www.cnblogs.com/crmhf/p/3823138.html
Copyright © 2011-2022 走看看