I haven't used a form tag to wrap the input, where i want to validate that input on the submit click
i tried using FormControl, i didn't get an idea to stop submitting the value, it gets submitted.
The code i tried is below
<div class="dead-line">
<span class="p-gap">To delivery in this period I want to recevive orders until
<a (click)="deadlineTime(i)" class="del-r">
<input type="date" class="form-control hide-dt" [formControl]="deadlineVal" required>
{{i.dead_line_time}}</a>
</span>
</div>
<button class="bt-save" (click)="submitHomeDelivery()">Save</button>
.ts
deadlineVal: FormControl = new FormControl('',
[Validators.required]);
submitHomeDelivery() {
var self = this;
console.log('self.deadlineVal', self.deadlineVal);
---------------------
---------------------
how could i prevent submitting(force input to be added), Any idea will appreciated