jQuery.MobileでDatePickerみたいなこと(jquery.mobile.datebox + 日本語化)
jQueryMobile - DateBox
http://dev.jtsage.com/jQM-DateBox/
日本語化
CDNから呼び出す場合、以下を宣言してやるだけでOK。
<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/i18n/jquery.mobile.datebox.i18n.ja.utf8.js"></script>
が、年月日の順番が残念なことになっているので、ダウンロードして以下に書き換え。
jQuery.extend(jQuery.mobile.datebox.prototype.options.lang, { 'jp': { setDateButtonLabel: "日付を確定", setTimeButtonLabel: "時刻を確定", setDurationButtonLabel: "日", calTodayButtonLabel: "本日", titleDateDialogLabel: "日付選択", titleTimeDialogLabel: "時刻選択", daysOfWeek: ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'], daysOfWeekShort: ['日', '月', '火', '水', '木', '金', '土'], monthsOfYear: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], monthsOfYearShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], durationLabel: ['日', '時', '分', '秒'], durationDays: ['日', '日'], tooltip: "日付を表示", nextMonth: "次月", prevMonth: "前月", timeFormat: 24, headerFormat: '%Y年 %b %d日(%a)', dateFieldOrder: ['y', 'm', 'd'], timeFieldOrder: ['h', 'i', 'a'], slideFieldOrder: ['y', 'm', 'd'], dateFormat: '%Y/%m/%d', useArabicIndic: false, isRTL: false, calStartDay: 0, clearButton: 'クリア', }, }); jQuery.extend(jQuery.mobile.datebox.prototype.options, { useLang: 'jp', });