Skip to content

Commit

Permalink
fix: format 12345 as 12 345
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Aug 25, 2020
1 parent d59baf3 commit 6c5f594
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ export default {
// шаблоны полей задаются здесь
if (field.type === 'integer' && valueText) {
valueText = new Intl.NumberFormat().format(valueText);
}
if (field.type === 'timestamp' && valueText) {
const offset = new Date().getTimezoneOffset() * 60000;
valueText = new Date(valueText * 1000 - offset).toISOString();
Expand Down

0 comments on commit 6c5f594

Please sign in to comment.