ユーザ用ツール

サイト用ツール


it技術:web開発:handsontable

差分

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

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
it技術:web開発:handsontable [2021/08/15 21:38] yajuadminit技術:web開発:handsontable [2021/09/18 01:35] – [カレンダーの日本語化] yajuadmin
行 131: 行 131:
     if (source === 'loadData') return;     if (source === 'loadData') return;
  
-    for (var i = 0; i < changes.length; i++) {+    for (let i = 0; i < changes.length; i++) {
         let change = changes[i];         let change = changes[i];
         // 編集と選択は対象外         // 編集と選択は対象外
行 168: 行 168:
 'use strict'; 'use strict';
  
-var MaxLengthEditor = Handsontable.editors.TextEditor.prototype.extend();+let MaxLengthEditor = Handsontable.editors.TextEditor.prototype.extend();
  
 MaxLengthEditor.prototype.prepare = function () { MaxLengthEditor.prototype.prepare = function () {
行 182: 行 182:
  
 // 使い方 // 使い方
-var table = new Handsontable(grid, {+let table = new Handsontable(grid, {
     data: data,      data: data, 
     columns: [     columns: [
行 217: 行 217:
 const dtFormat = 'YYYY/MM/DD'; const dtFormat = 'YYYY/MM/DD';
          
-var isFuture = function (value, callback) {+let isFuture = function (value, callback) {
     if (moment(value, dtFormat).isValid() && value > moment(new Date()).format(dtFormat)) {     if (moment(value, dtFormat).isValid() && value > moment(new Date()).format(dtFormat)) {
         callback(false);         callback(false);
行 894: 行 894:
 === 変更後イメージ === === 変更後イメージ ===
 {{:it技術:web開発:datapicker.png}} {{:it技術:web開発:datapicker.png}}
 +
 +===== カスタムエディター =====
 +==== Tips ====
 +  * open時直後に、event.stopPropagation(); を入れるとマウスダウンされたままなのでセル移動すると領域選択された状態になってしまう。
it技術/web開発/handsontable.txt · 最終更新: 2021/09/18 02:05 by yajuadmin