Javascript 带格式的Slimpicker日期问题

Javascript 带格式的Slimpicker日期问题,javascript,slimpicker,Javascript,Slimpicker,我已经安装了slimpicker,我正在使用它 这个想法是: 我对年份的选择有问题,如果我选择2012年,我会得到如下结果: dd/mm/112 如果我选择2013年,尽管我得到: 2013年12月23日 这很奇怪。 以下是js的数据: dayChars: 1, monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October',

我已经安装了slimpicker,我正在使用它

这个想法是: 我对年份的选择有问题,如果我选择2012年,我会得到如下结果: dd/mm/112

如果我选择2013年,尽管我得到: 2013年12月23日

这很奇怪。 以下是js的数据:

dayChars: 1,
        monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
        dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
        daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], // Leap year is added later
        format: 'mm/dd/yyyy',                                          // How the output looks after selection
        yearStart: (new Date().getFullYear()),                     // Default starting year for dropdown options is 5 years ago
        yearRange: 10,                                                 // Show a 10 year span
        yearOrder: 'asc',                                              // Counting up in years
        startDay: 7                       // 1 = week starts on Monday, 7 = week starts on Sunday
    },

在slimpicker.js中搜索代码如下

//要在日历上显示的日期

this.currentYear = this.calendarYear = this.current.getYear();
this.currentMonth = this.calendarMonth = this.current.getMonth();
this.currentDay = this.current.getDate();
this.currentYear = this.calendarYear = this.current.getFullYear();
this.currentMonth = this.calendarMonth = this.current.getMonth();
this.currentDay = this.current.getDate();
并更改如下

//要在日历上显示的日期

this.currentYear = this.calendarYear = this.current.getYear();
this.currentMonth = this.calendarMonth = this.current.getMonth();
this.currentDay = this.current.getDate();
this.currentYear = this.calendarYear = this.current.getFullYear();
this.currentMonth = this.calendarMonth = this.current.getMonth();
this.currentDay = this.current.getDate();

你能把代码贴在你读到的值和得到错误结果的地方吗。是 啊很抱歉谢谢大家