I am working on Angular7 and its compatible ngx-mat-datetime-picker. It works as expected.
Want to customize the format:
Actual: mm/dd/yyyy, hh:mm:ss
Expected: yyyy-mm-dd hh:mm:ss
Currently I don't find any option for formatting.
I tried something like this in template value="{{ mydate | date: 'yyyy-mm-dd hh:mm:ss' }}
But not working.
You need to create a custom adapter and specify the custom formats
Please find the CustomNgxDatetimeAdapter.ts from the below gist
https://gist.github.com/nandhakumargdr/635af05419793e15f3758656ddd1ef39
Have tested it. It is working!