Created
May 7, 2017 03:36
-
-
Save goofmint/53e6eb2a49d153e080b37dd76312a008 to your computer and use it in GitHub Desktop.
1.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let data = { | |
closeText: '閉じる', prevText: '<前', nextText: '次>', | |
currentText: '今日', weekHeader: '週', dateFormat: 'yy/mm/dd', | |
firstDay: 0, isRTL: false, showMonthAfterYear: true, yearSuffix: '年', | |
monthNames: [], monthNamesShort: [], dayNames: [], | |
dayNamesShort: [], dayNamesMin: [] | |
}; | |
// 日付の作成(1〜12月) | |
for (let i = 1; i <= 12; i++) { | |
data.monthNames.push(`${i}月`); | |
data.monthNamesShort.push(`${i}月`); | |
} | |
// 曜日の作成(日〜土曜日) | |
let weekdays = ['日','月','火','水','木','金','土']; | |
for (let index in weekdays) { | |
data.dayNames.push(`${weekdays[index]}曜日`); | |
data.dayNamesShort.push(weekdays[index]); | |
data.dayNamesMin.push(weekdays[index]); | |
} | |
$.datepicker.regional['ja'] = data; | |
$.datepicker.setDefaults($.datepicker.regional['ja']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment