Hi, I have a problem. I am trying to use c8y-datetime-picker in our application but seconds are not being passed to the component on edit. Minutes and hours update correctly. Below simplest case I tried to confirm this is not anything in our code. Please advice, is this a known problem or maybe I am missing something in the config of the picker. Thanks
Our SDK version is 1021.22.145 btw
//css
.card–grid {
max-width: 640px;
}
code {
word-break: break-all;
}
//template
<div class="card card--grid">
<div class="card-header separator">
<h4 class="card-title" translate>Date Time Picker Debug</h4>
</div>
<div class="card-block">
<form #debugForm="ngForm" (ngSubmit)="submit()">
<c8y-form-group>
<label for="debugDatePicker" translate>Pick date and time</label>
<c8y-date-time-picker
id="debugDatePicker"
name="debugDate"
\[(ngModel)\]="selectedDate"
\[config\]="pickerConfig"
required
></c8y-date-time-picker>
</c8y-form-group>
<button
type="submit"
class="btn btn-primary"
\[disabled\]="debugForm.invalid"
>
<span translate>Submit</span>
</button>
</form>
<div class="m-t-16" \*ngIf="submittedDate">
<p>
<strong translate>Submitted ISO (picker value):</strong>
<code>{{ submittedDate }}</code>
</p>
<p>
<strong translate>Submitted UTC string:</strong>
{{ submittedDateUtc }}
</p>
</div>
</div>
</div>
//component
import { Component } from “@angularangular/core”;
@Component({
selector: “am-dt-date-time-picker-debug”,
templateUrl: “./date-time-picker-debug.component.html”,
styleUrls: [“./date-time-picker-debug.component.css”],
})
export class DateTimePickerDebugComponent {
selectedDate: string | null = new Date().toISOString();
submittedDate: string | null = null;
submittedDateUtc: string | null = null;
readonly pickerConfig = {
showSeconds: true,
};
submit(): void {
if (!this.selectedDate) {
this.submittedDate = null;
this.submittedDateUtc = null;
return;
}
this.submittedDate = new Date(this.selectedDate).toLocaleString();
this.submittedDateUtc = new Date(this.selectedDate).toISOString();
}
}
