Issue
I want to set the value as 0 when the value is null. Currently, I'm using angular primeng materials.
<p-calendar [(ngModel)]="model.start_time" [timeOnly]="true" placeholder="00:00"></p-calendar>
I want to set minutes' default value as 0.
Solution
In this matter, we can give value to the ngModel. So we have to use the .ts file to set the value to the ngModel.
.ts
export class classComponent{
this.model.start_time = 0;
}
Answered By - Damith Asanka
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.