jqgrid_utils 1.4.6 → 1.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -4
- package/dist/jqgrid_utils.js +28 -2
- package/jqgrid_utils.js +28 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,8 @@ A module for Jqgrid_utils
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
* [Jqgrid_utils](#module_Jqgrid_utils)
|
|
30
|
-
* [module.exports#
|
|
30
|
+
* [module.exports#_date112_to_DMY(cell_value, seperator)](#exp_module_Jqgrid_utils--module.exports+_date112_to_DMY) ⏏
|
|
31
|
+
* [module.exports#date112_to_DMY(col_model, edit_field, seperator)](#exp_module_Jqgrid_utils--module.exports+date112_to_DMY) ⏏
|
|
31
32
|
* [module.exports#add_ok_button(col_model, fields)](#exp_module_Jqgrid_utils--module.exports+add_ok_button) ⇒ <code>array</code> ⏏
|
|
32
33
|
* [module.exports#get_filled_cell_table_data(_grid, fields)](#exp_module_Jqgrid_utils--module.exports+get_filled_cell_table_data) ⇒ <code>array</code> ⏏
|
|
33
34
|
* [module.exports#get_filled_cell_data(_grid, fields)](#exp_module_Jqgrid_utils--module.exports+get_filled_cell_data) ⇒ <code>object</code> ⏏
|
|
@@ -56,9 +57,27 @@ A module for Jqgrid_utils
|
|
|
56
57
|
* [module.exports#set_filter(grid, data, fx, append_to)](#exp_module_Jqgrid_utils--module.exports+set_filter) ⏏
|
|
57
58
|
* [module.exports#_filter()](#exp_module_Jqgrid_utils--module.exports+_filter) ⏏
|
|
58
59
|
|
|
59
|
-
<a name="exp_module_Jqgrid_utils--module.exports+
|
|
60
|
+
<a name="exp_module_Jqgrid_utils--module.exports+_date112_to_DMY"></a>
|
|
60
61
|
|
|
61
|
-
### module.exports
|
|
62
|
+
### module.exports#\_date112\_to\_DMY(cell_value, seperator) ⏏
|
|
63
|
+
Convert a 112 date string to a DMY format with sepertaor - sync function
|
|
64
|
+
|
|
65
|
+
**Kind**: Exported function
|
|
66
|
+
|
|
67
|
+
| Param | Type | Default | Description |
|
|
68
|
+
| --- | --- | --- | --- |
|
|
69
|
+
| cell_value | <code>string</code> | | date string |
|
|
70
|
+
| seperator | <code>string</code> | <code>"/"</code> | seperator used |
|
|
71
|
+
|
|
72
|
+
**Example**
|
|
73
|
+
```js
|
|
74
|
+
var jqu = new Jqgrid_utils();
|
|
75
|
+
let _data = jqu._date112_to_DMY('20220104','/');
|
|
76
|
+
console.log(_data);
|
|
77
|
+
```
|
|
78
|
+
<a name="exp_module_Jqgrid_utils--module.exports+date112_to_DMY"></a>
|
|
79
|
+
|
|
80
|
+
### module.exports#date112\_to\_DMY(col_model, edit_field, seperator) ⏏
|
|
62
81
|
Convert a 112 date to a DMY format with sepertaor
|
|
63
82
|
|
|
64
83
|
**Kind**: Exported function
|
|
@@ -72,7 +91,7 @@ Convert a 112 date to a DMY format with sepertaor
|
|
|
72
91
|
**Example**
|
|
73
92
|
```js
|
|
74
93
|
var jqu = new Jqgrid_utils();
|
|
75
|
-
let _data = await jqu.
|
|
94
|
+
let _data = await jqu.date112_to_DMY(this,'field','/');
|
|
76
95
|
console.log(_data);
|
|
77
96
|
```
|
|
78
97
|
<a name="exp_module_Jqgrid_utils--module.exports+add_ok_button"></a>
|
package/dist/jqgrid_utils.js
CHANGED
|
@@ -22,6 +22,32 @@ module.exports = class Vanilla_website_utils
|
|
|
22
22
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Convert a 112 date string to a DMY format with sepertaor - sync function
|
|
28
|
+
@alias module:Jqgrid_utils
|
|
29
|
+
@param {string} - date string
|
|
30
|
+
@param {string} - seperator used
|
|
31
|
+
@example
|
|
32
|
+
var jqu = new Jqgrid_utils();
|
|
33
|
+
let _data = jqu._date112_to_DMY('20220104','/');
|
|
34
|
+
console.log(_data);
|
|
35
|
+
*/
|
|
36
|
+
_date112_to_DMY(cell_value, seperator='/')
|
|
37
|
+
{
|
|
38
|
+
let value = cell_value;
|
|
39
|
+
if(cell_value.length >= 8 && cell_value.indexOf(seperator) === -1)
|
|
40
|
+
{
|
|
41
|
+
let a = [];
|
|
42
|
+
a.push(cell_value.substr(6, 2));
|
|
43
|
+
a.push(cell_value.substr(4, 2));
|
|
44
|
+
a.push(cell_value.substr(0, 4));
|
|
45
|
+
value = a.join(seperator);
|
|
46
|
+
}
|
|
47
|
+
return value;
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
25
51
|
/**
|
|
26
52
|
* Convert a 112 date to a DMY format with sepertaor
|
|
27
53
|
@alias module:Jqgrid_utils
|
|
@@ -30,10 +56,10 @@ module.exports = class Vanilla_website_utils
|
|
|
30
56
|
@param {string} - seperator used
|
|
31
57
|
@example
|
|
32
58
|
var jqu = new Jqgrid_utils();
|
|
33
|
-
let _data = await jqu.
|
|
59
|
+
let _data = await jqu.date112_to_DMY(this,'field','/');
|
|
34
60
|
console.log(_data);
|
|
35
61
|
*/
|
|
36
|
-
async
|
|
62
|
+
async date112_to_DMY(col_model, edit_field , seperator='/')
|
|
37
63
|
{
|
|
38
64
|
for(let i=0;i< col_model.length;i++)
|
|
39
65
|
{
|
package/jqgrid_utils.js
CHANGED
|
@@ -21,6 +21,32 @@ module.exports = class Vanilla_website_utils
|
|
|
21
21
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Convert a 112 date string to a DMY format with sepertaor - sync function
|
|
27
|
+
@alias module:Jqgrid_utils
|
|
28
|
+
@param {string} - date string
|
|
29
|
+
@param {string} - seperator used
|
|
30
|
+
@example
|
|
31
|
+
var jqu = new Jqgrid_utils();
|
|
32
|
+
let _data = jqu._date112_to_DMY('20220104','/');
|
|
33
|
+
console.log(_data);
|
|
34
|
+
*/
|
|
35
|
+
_date112_to_DMY(cell_value, seperator='/')
|
|
36
|
+
{
|
|
37
|
+
let value = cell_value;
|
|
38
|
+
if(cell_value.length >= 8 && cell_value.indexOf(seperator) === -1)
|
|
39
|
+
{
|
|
40
|
+
let a = [];
|
|
41
|
+
a.push(cell_value.substr(6, 2));
|
|
42
|
+
a.push(cell_value.substr(4, 2));
|
|
43
|
+
a.push(cell_value.substr(0, 4));
|
|
44
|
+
value = a.join(seperator);
|
|
45
|
+
}
|
|
46
|
+
return value;
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
|
|
24
50
|
/**
|
|
25
51
|
* Convert a 112 date to a DMY format with sepertaor
|
|
26
52
|
@alias module:Jqgrid_utils
|
|
@@ -29,10 +55,10 @@ module.exports = class Vanilla_website_utils
|
|
|
29
55
|
@param {string} - seperator used
|
|
30
56
|
@example
|
|
31
57
|
var jqu = new Jqgrid_utils();
|
|
32
|
-
let _data = await jqu.
|
|
58
|
+
let _data = await jqu.date112_to_DMY(this,'field','/');
|
|
33
59
|
console.log(_data);
|
|
34
60
|
*/
|
|
35
|
-
async
|
|
61
|
+
async date112_to_DMY(col_model, edit_field , seperator='/')
|
|
36
62
|
{
|
|
37
63
|
for(let i=0;i< col_model.length;i++)
|
|
38
64
|
{
|
package/package.json
CHANGED