ng2-datetime icon indicating copy to clipboard operation
ng2-datetime copied to clipboard

getting error ( If ngModel is used within a form tag, either the name attribute must be set or the form )

Open nileshyadav326 opened this issue 7 years ago • 5 comments

can u suggest how to resolve the same.

nileshyadav326 avatar Jul 25 '17 08:07 nileshyadav326

is this module in active development?

have found the solution if it's not in development so that I can go and directly change the code in the node_module folder.

nileshyadav326 avatar Jul 28 '17 18:07 nileshyadav326

There is no change required to the source code. The error message clearly indicates what to do.

wartab avatar Jul 29 '17 14:07 wartab

i understand but after doing the same changes other options not for ex.

<datetime [timepicker]="false" [(ngModel)]="date3" [ngModelOptions]="{standalone: true}">

now timepicker didnt hide.

nileshyadav326 avatar Jul 30 '17 17:07 nileshyadav326

well #164 fix the above issue also.

nileshyadav326 avatar Jul 30 '17 18:07 nileshyadav326

I hope this error solves if we just add the name tag to the element.

i.e,. <datetime [(ngModel)]="date" name="date">

The issue can be closed if it is ok

sulthanallaudeen avatar Aug 28 '17 07:08 sulthanallaudeen