ユーザ用ツール

サイト用ツール


it技術:web開発:pikaday

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
it技術:web開発:pikaday [2018/08/21 17:26] – [日付フォーマット] yajuadminit技術:web開発:pikaday [2018/08/22 11:02] (現在) yajuadmin
行 64: 行 64:
 }, },
 </code> </code>
 +
 +=== Moment.js のローカル版を使用する場合 ===
 +「moment.locale('ja');」を実行すれば、monthsとweekdaysとweekdaysShortは、Momentから取得できる。
 +
 +<code javascript>
 +moment.locale('ja');
 +
 +// the default output format for `.toString()` and `field` value
 +format: 'YYYY/MM/DD',
 +
 +// first day of week (0: Sunday, 1: Monday etc)
 +firstDay: 0,
 + 
 +// Additional text to append to the year in the calendar title
 +yearSuffix: '年',
 + 
 +// Render the month after year in the calendar title
 +showMonthAfterYear: true,
 + 
 +// Render days of the calendar grid that fall in the next or previous month
 +showDaysInNextAndPreviousMonths: true,
 + 
 +// internationalization
 +i18n: {
 +    previousMonth: '前月',
 +    nextMonth: '次月',
 +    months: moment.localeData()._months,
 +    weekdays: moment.localeData()._weekdays,
 +    weekdaysShort: moment.localeData()._weekdaysShort
 +}
 +</code>
 +
  
 === 土日の色を変更する === === 土日の色を変更する ===
it技術/web開発/pikaday.1534839968.txt.gz · 最終更新: 2018/08/21 17:26 by yajuadmin