0

I have a scenario where the date format will be provided from the backend. So I want to dynamically set the date format based on the value provided.

ex: 'DD/MM/YYYY', 'MM/DD/YYYY' or 'YYYY/MM/DD'

I have gone through the Angular Material for Datepicker but wasn't able to find a way to implement.

Please find the minimal code over here (Stack Blitz).

Note: The compiler is throwing error since I am not able to fetch the date format from my dummy service datepicker-moment.service.ts

Naseer
  • 31
  • 6
  • You can see this https://stackoverflow.com/questions/46392275/angular-material-2-change-datepicker-date-format-mm-dd-yyyy-to-dd-mm-yyyy-s – Shohel Feb 14 '19 at 12:58
  • please refer this may helpful http://blog.manishsood.in/change-date-format-in-material-datepicker-angular-2-and-angular-4/?i=1 – Lalji Kanjareeya Feb 14 '19 at 12:59

0 Answers0