Hi, we're using abp-datetime-picker like this:
<abp-datetime-picker
[bsConfig]="{ adaptivePosition: true }"
[(ngModel)]="fristDatum"
id="Frist_FristDatum"
name="Frist_FristDatum"
required
[disabled]="frist.id && frist.fristTyp == 'F'" />
this.fristDatum is initialized with this.fristDatum = DateTime.local();. In this modal, we may change this.fristDatum programatically according to some calculations, which we then set like this to create a safe, clean new value:
this.fristDatum = DateTime.local(this.fristDatum.year, this.fristDatum.month, this.fristDatum.day, 0, 0, 0);
The picker shows it correctly:

But this works only once, the second time we change it the date is not being displayed correctly anymore, but looks like this:

Can you please check why it's behaving like this and what we can do to fix it? Thanks!
We are using Zero 14.2.1 (Angular).
1 Answer(s)
-
0
Hi @ips-ad
Have you tried assigning a date-time to the Date property using the
DateTimeServicein thengOnInitphase, as indemo-ui-date-time.component.ts? You can find the sample code at this link.Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)