@siemens/element-ng 48.10.0 → 48.10.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.
@@ -2201,11 +2201,10 @@ class SiTimepickerComponent {
2201
2201
  });
2202
2202
  }
2203
2203
  writeValue(obj) {
2204
- if (this.isValidDate(obj)) {
2205
- this.setTime(this.parseTime(obj));
2206
- }
2207
- else if (obj == null) {
2208
- this.setTime();
2204
+ const time = this.parseTime(obj);
2205
+ if (!time || this.isValidDate(time)) {
2206
+ this.time = time;
2207
+ this.updateUI(this.time);
2209
2208
  }
2210
2209
  }
2211
2210
  /** @internal */
@@ -2290,7 +2289,7 @@ class SiTimepickerComponent {
2290
2289
  * @param time - The new time to be set.
2291
2290
  */
2292
2291
  setTime(time) {
2293
- if (this.time !== time) {
2292
+ if (this.time?.getTime() !== time?.getTime()) {
2294
2293
  this.time = time;
2295
2294
  this.updateUI(this.time);
2296
2295
  this.onChange(this.time);
@@ -2943,7 +2942,7 @@ class SiDatepickerComponent {
2943
2942
  return true;
2944
2943
  }
2945
2944
  timeSelected(newTime) {
2946
- if (newTime == null || newTime === this.time.value) {
2945
+ if (newTime == null) {
2947
2946
  return;
2948
2947
  }
2949
2948
  this.previousTime = this.time.value;