ywana-core8 0.0.335 → 0.0.338
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/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +5 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +10 -11
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -210,18 +210,17 @@ const StringCellViewer = ({ id, value, format, options }) => {
|
|
210
210
|
const option = options ? buildOptions().find(o => o.value === value) : null
|
211
211
|
|
212
212
|
let text = option ? option.label : value
|
213
|
-
const
|
213
|
+
const locale = window.navigator.userLanguage || window.navigator.language;
|
214
214
|
switch (format) {
|
215
|
-
case FORMATS.DATE:
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
day: 'second'
|
224
|
-
}); break;
|
215
|
+
case FORMATS.DATE:
|
216
|
+
let fecha = new Date(text)
|
217
|
+
console.log("fecha1", fecha)
|
218
|
+
fecha.setMinutes(fecha.getMinutes() + fecha.getTimezoneOffset())
|
219
|
+
console.log("fecha2", fecha)
|
220
|
+
text = fecha.toLocaleString( locale, { year: 'numeric', month: 'numeric', day: 'numeric'});
|
221
|
+
break;
|
222
|
+
case FORMATS.TIME:
|
223
|
+
text = new Date(text).toLocaleString( locale, { year: 'hour', month: 'minute', day: 'second' }); break;
|
225
224
|
}
|
226
225
|
return (<div className="field-editor string-viewer">{text}</div>)
|
227
226
|
}
|