Answer the question
In order to leave comments, you need to log in
Why is ngmodel not working?
I work in ionic
There is an input for entering a date with a two-way binding
<ion-datetime (ionChange)="validateBookingDate()"
[(ngModel)]="bookingDate"
displayFormat="DD MMMM YYYY"
pickerFormat="DD MMMM YYYY" ></ion-datetime>
</ion-item>
validateBookingDate(){
if(this.product.booking.includes(this.bookingDate)){
this.bookingDate = ""
alert('товар уже забронирован на эту дату')
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question