Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created May 7, 2017 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/53e6eb2a49d153e080b37dd76312a008 to your computer and use it in GitHub Desktop.
Save goofmint/53e6eb2a49d153e080b37dd76312a008 to your computer and use it in GitHub Desktop.
1.md
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