0

私はこのスリムピッカーをインストールしています、まあ私はそれを使用しています。

アイデアは次のとおりです。年の選択に問題があります。2012を選択すると、dd / mm/112のようになります。

2013を選択した場合、次のようになります:dd / mm / 2013

これは奇妙です。これは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
    },
4

1 に答える 1

2

あなたの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();
于 2013-11-14T16:07:25.837 に答える