Since the format for @danielmoncada/angular-datetime-picker datepicker is being provided via Angular DI, we need to utilize this approach and dynamically provide the formats.
This is what the dates From and To look like now:
This is what I wanted to achieve: when we have month view selected - we dynamically change the datepicker formats to the desired:


First we need to create a format provider service, which we will then inject into the datepicker component:
Inject in into the component and use useFactory to get the format.
In same component in OnInit Hook you can overwrite the default provided value:
If we need to dynamically change the date-format of the datepicker - it only works in OnInit hook. We need to re-render the component and trigger OnInit E.g. with use of *ngIf and async pipe on datepicker selector in parent component.