td-stylekit 28.30.1 → 28.30.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [28.30.2](https://github.com/treasure-data/td-stylekit/compare/v28.30.1...v28.30.2) (2023-12-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **CON-11008:** Fix issue in TimeControl ([#1517](https://github.com/treasure-data/td-stylekit/issues/1517)) ([85fdca4](https://github.com/treasure-data/td-stylekit/commit/85fdca4))
7
+
1
8
  ## [28.30.1](https://github.com/treasure-data/td-stylekit/compare/v28.30.0...v28.30.1) (2023-12-14)
2
9
 
3
10
 
@@ -66,9 +66,10 @@ function useDisplayValue(time, editor, onChange) {
66
66
  }, [period, editor]);
67
67
 
68
68
  var reconcileShadowValue = function reconcileShadowValue() {
69
- if (time && (0, _dateFns.isValid)(new Date(time))) {
70
- var twentyFourHourTime = (0, _dateFns.format)(new Date(time !== null && time !== void 0 ? time : '00:00'), TIME_FORMAT_24);
71
- setShadowValue((0, _dateFns.format)(new Date(twentyFourHourTime), displayFormat));
69
+ var date = (0, _dateFns.parse)(time !== null && time !== void 0 ? time : '00:00', TIME_FORMAT_24, Date.now());
70
+
71
+ if (time && (0, _dateFns.isValid)(date)) {
72
+ setShadowValue((0, _dateFns.format)(date, displayFormat));
72
73
  }
73
74
  }; // If we do not have an initial value then we use the current time (when editing
74
75
  // hh:mm:ss) or always 00:00 when editing mm:ss. We override default behaviour of TimePicker.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "td-stylekit",
3
- "version": "28.30.1",
3
+ "version": "28.30.2",
4
4
  "main": "dist/es/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",