カレンダーの表示を日本風にするには?(datepicker)

datepickerはそのままだと月の名前や曜日が英語表記になってます。

これを英語がんにするには以下のようにjquery-uiのファイルを変更すればOKです。
————–
$ diff jquery-ui-1.8.16.custom.min.js.org jquery-ui-1.8.16.custom.min.js
485,486c485,486
< "ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:”Done”,prevText:”Prev”,nextText:”Next”,currentText:”Today”,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],dayNamesShort:["日","月","火","水","木","金","土"],dayNamesMin:["Su",
> "Mo","Tu","We","Th","Fr","Sa"],weekHeader:”Wk”,dateFormat:”yy/mm/dd (D)”,firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:””};this._defaults={showOn:”focus”,showAnim:”fadeIn”,showOptions:{},defaultDate:null,appendText:””,buttonText:”…”,buttonImage:””,buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:”c-10:c+10″,showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:”+10″,
791c791
————–

という方法もありますが、もっといい方法がりました。
日本語表にdatepickerファイルがありました。

development-bundleuii18njquery.ui.datepicker-ja.js

これを読み込めばOKです!たぶん!

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>