Would like some tips on how to do that. The today's date is chosen but not selected. I want it selected same as if I click-select it. So it looks like this: https://imgur.com/H7Y3QYa
I guess this ng-model="modalcontroller.invoice.paid_at"paid_at is null` it does not have a default date.. So maybe if you return anything from it, then it will get selected.
So in your Invoice model if you add:
public function getPaidAtAttribute($value)
{
return $value ?? today();
}
@Nakov It works, but the invoices is getting MARKED as paid, but not really paid. So by clicking on Register payment, the invoice got paid all right with today's date highlighted and selected. Now I need to figure out why the got marked as paid. Do you have any idea?
So the ng-if="signup.invoice.paid_at" is clearly responsible for that. So how to prevent the invoice to be marked as paid? This is how it looks like: https://imgur.com/kRTwMnj the number without blue square is unpaid and with blue square marked as paid. Maybe to invoke a flag or something to determine whether the invoice is paid or not?