<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"

相关文章:

  • 2021-07-08
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-02
  • 2021-12-10
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
相关资源
相似解决方案