angular2-datetimepicker icon indicating copy to clipboard operation
angular2-datetimepicker copied to clipboard

Set Time button is submitting the form when the picker is hosted within a form

Open JohnMcAvinue opened this issue 6 years ago • 2 comments

The Set Time button is defined like this in the component code:

<button class="button" (click)="setTimeView()">Set Time

As you can see, it has no type attribute so by default it is treated as a submit rather than a button.

As a result when you click Set Time it is submitting the form and this is incorrect behaviour. Could an attribute of type="button" be added? I will submit a P.R now

JohnMcAvinue avatar Jul 12 '18 13:07 JohnMcAvinue

I also face the same issue.

muthukumaroptisol avatar Aug 06 '18 19:08 muthukumaroptisol

any feedback from developers to your issues?

kingjulian32 avatar Oct 16 '18 12:10 kingjulian32