Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Angular Material DatePicker Custom Format Example

I’m looking at this StackBlitz here:

https://stackblitz.com/edit/y7p87g?file=src%2Fexample%2Fdatepicker-formats-example.html,src%2Fexample%2Fdatepicker-formats-example.ts

And I’m wondering how to format the date that displays in the collapsed control (underneath "Verbose datepicker" to something like 25-Dec-2023, instead of December 25, 2023. I’ve tried tweaking those display options to no avail.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

The API documentation doesn’t seem to say what options are available for this.

Thanks in advance!

>Solution :

I think you need to change dateInput from LL to dateInput: 'DD-MMM-YYYY', or to some other date formats which you need

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading