ywana-core8 0.0.230 → 0.0.231

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.
@@ -1036,6 +1036,7 @@ var TYPES = {
1036
1036
  var FORMATS = {
1037
1037
  NONE: '',
1038
1038
  DATE: 'date',
1039
+ TIME: 'time',
1039
1040
  EMAIL: 'email',
1040
1041
  HTML: 'HTML',
1041
1042
  URL: 'URL'
@@ -1622,10 +1623,23 @@ var StringCellViewer = function StringCellViewer(_ref7) {
1622
1623
  return o.value === value;
1623
1624
  }) : null;
1624
1625
  var text = option ? option.label : value;
1626
+ var locale = window.navigator.userLanguage || window.navigator.language;
1625
1627
 
1626
1628
  switch (format) {
1627
1629
  case FORMATS.DATE:
1628
- text = new Date(text).toLocaleString();
1630
+ text = new Date(text).toLocaleString(locale, {
1631
+ year: 'numeric',
1632
+ month: 'numeric',
1633
+ day: 'numeric'
1634
+ });
1635
+ break;
1636
+
1637
+ case FORMATS.TIME:
1638
+ text = new Date(text).toLocaleString(locale, {
1639
+ year: 'hour',
1640
+ month: 'minute',
1641
+ day: 'second'
1642
+ });
1629
1643
  break;
1630
1644
  }
1631
1645