Closed POFerro closed 4 years ago
Sorry, I cannot reproduce.
Can you post applicable HTML and component.ts with the date picker / models?
Here is how I'm testing:
<input [(ngModel)]="selectedMoments"
[owlDateTimeTrigger]="date_range_component"
[owlDateTime]="date_range_component"
[max]="endValue"
id="daterange"
matInput
required>
<owl-date-time #date_range_component></owl-date-time>
Hi Daniel,
My sample html is:
<input matInput [owlDateTime]="birthDatePicker" name="birthDate" [(ngModel)]="client.birthDate" required> <owl-date-time #birthDatePicker pickerType="calendar"></owl-date-time>
It's basically identical to yours.
I believe what's missing for you to reproduce is the setting in tsconfig.json to tell angular compiler to compile the html templates, wich is:
"angularCompilerOptions": { "fullTemplateTypeCheck": true, "strictInjectionParameters": true, "strictTemplates": true }
Thanks and best regards POFerro
Hi Daniel,
My sample html is:
<input matInput [owlDateTime]="birthDatePicker" name="birthDate" [(ngModel)]="client.birthDate" required> <owl-date-time #birthDatePicker pickerType="calendar"></owl-date-time>
It's basically identical to yours. I believe what's missing for you to reproduce is the setting in tsconfig.json to tell angular compiler to compile the html templates, wich is:"angularCompilerOptions": { "fullTemplateTypeCheck": true, "strictInjectionParameters": true, "strictTemplates": true }
Thanks and best regards POFerro
ahh, yeah, let me give it a try
@POFerro fixed in latest version 9.4.1
Tks daniel, it's working like a charm ;)
Hi,
When compiling an html template with
<input matInput [owlDateTime]="birthDatePicker" name="birthDate" [(ngModel)]="client.birthDate" [max]="maxBirthDate" required>
I get the following compilation error:
error TS2322: Type 'string' is not assignable to type 'boolean'.
Shouldn't this way of setting required be supported? I believe in this case type for required property should beboolean | ''
.Thanks in advance and best regards POFerro