Is it correct to implement a custom NgbDateParserFormatter to change the format of the input value on NgbInputDatepicker?
As of today implementing a custom NgbDateParserFormatter
is the best way to go. So yes, it is a correct way.
In the future we might have a more sophisticated implementation of the NgbDateParserFormatter
where you will be able to just pass a desired format (ex. yyyy-MM-dd
). Adding this feature will depend on user's interest.
You might also check some more background info in https://github.com/ng-bootstrap/ng-bootstrap/issues/754#issuecomment-247767027