Skip to content

Make AM/PM prompts lowercase or change them

amCharts’ number formatter supports various version of the AM/PM indicators (AM/PM; A.M./P.M.; A/P) in date/time formats, however they are all in upper case. This short tutorial will show how you can make them lowercase, or change them altogether.

Since AM/PM are translatable strings, they are represented in your current locale (or collection of prompts and formats for your selected language).

All we need to do, is modify those language prompts:

chart.language.locale["AM"] = "am";
chart.language.locale["PM"] = "pm";
Open in CodePen