Open Kartax opened 2 months ago
Hi, it looks like it's a compiler error since OwlNativeDateTimeModule & OwlDateTimeModule are not considered ngModule classes since ng-pick-datetime is not compatible with Ivy in angular 17. I'll recommend using mat-datepicker as they have good UI and are compatible with the latest angular version.
<mat-form-field> <input matInput [matDatepicker]="picker" placeholder="Choose a date"> <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> <mat-datepicker #picker></mat-datepicker> </mat-form-field>
But i need a dateTimePicker. Angular-Material not offering that is the reason for this and similar repositories.
ok then try this, this gives date and time and the same UI too Material date time picker
That is the one that does not work with Angular 17
Heyho @Kartax, i just had a look at this and the demo application has basically the same setup as your code example but it works without any hickups there. See: https://github.com/NetWin/date-time-picker/blob/master/src/app/app.component.html#L22-L36
Can you provide a full example that shows this error? (Stackblitz maybe)
I also tried to use (almost) exactly the code you posted above (i only removed the angular material components / directives) and it works.
I cannot get the very basic input to work in my Angular 17 Application.
template:
<mat-form-field appearance="outline">
<mat-label>Gültig ab</mat-label>
<input matInput formControlName="validfrom" [owlDateTime]="validfromDt" [owlDateTimeTrigger]="validfromDt">
<owl-date-time #validfromDt></owl-date-time>
</mat-form-field>
and i have
OwlDateTimeModule, OwlNativeDateTimeModule
in my imports.When i view my form everything looks fine, but when i click into the datetime-input it "tries" to render the calender, but fails with following error:
When i continue to click, i see a partially rendered calendar and even more but similar errors (Cannot read properties of null ...)
Does somebody have an idea how to solve this?