Skip to content

DatePicker two-way binding via [(ngModel)] is not working with docs exemple #506

@Quovadisqc

Description

@Quovadisqc

The documentation for NativeScript-Angular mentions to use the DatePicker control like this:
<datePicker #datePicker (loaded)="configure(datePicker)" verticalAlignment="center"></datePicker>

If I use this exemple to implement two-way binding using ngModel
<datePicker #endDatePicker [(ngModel)]="endDate"></datePicker>
I get this error:

No value accessor for form control with unspecified name attribute

If I use this code instead, it works perfectly
<DatePicker #endDatePicker [(ngModel)]="endDate"></DatePicker>

Perhaps this is a typo in the documentation?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions