w2ui gridチートシート
Renderの種類と表示
データ | render | 結果(デフォルトen-us) | 結果(ja-jp) |
---|---|---|---|
テスト | text | テスト | テスト |
1234.5 | int | 1,235 | 1,235 |
1234.5 | float:0 | 1,235 | 1,235 |
1234.5 | float:1 | 1,234.5 | 1,234.5 |
1234.5 | float:2 | 1,234.50 | 1,234.50 |
1234.5 | number:0 | 1,235 | 1,235 |
1234.5 | number:1 | 1,234.5 | 1,234.5 |
1234.5 | number:2 | 1,234.50 | 1,234.50 |
1234.5 | money | $1,234.50 | \1,235 |
1234.5 | currency | $1,234.50 | \1,235 |
1234.5 | percent | 1,234.5% | 1,234.5% |
2000/01/01 | age | 15.7 years | 15.7 years |
2013/01/03 | date | Jan 3, 2013 | 2013年1月月03日 |
2013/01/03 | date:yyyy/mm | 2013/01 | 2013/01 |
1:52 pm | time | 13:52 | 13:52 |
13:52 | time | 13:52 | 13:52 |
13:52 | time:h12 | 1:52 pm | 1:52 pm |
13:52 | time:h24 | 13:52 | 13:52 |
1.4.3のバグ
- 6448行目のformatTimeの引数に'h24:min'となっているが'h24:mi'が正しいので注意。
- ロケールja-jpのdateは月が2つ続くので注意。
日本語表示
// 日本語のjsonファイルを適用 w2utils.locale('/lib/w2ui/locale/ja-jp.json');
セルの水平位置
{ field: 'hoge', caption: 'hoge', size: '40px', // styleで変更が出来る style: 'text-align:center' }