# \[IGN-732\] Locale for datetime picker on components

**URL:** <https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [March 17, 2023, 8:59am UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212 "2023-03-17T08:59:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [March 17, 2023, 8:59am UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/1 "2023-03-17T08:59:10Z")

</div>

Hi,

I see it's possible to change the locale property in the Date Time Picker:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f35a5f17d4eddbdceaad1962b798b69ec6da9ed8.png)

But I don't see those options for built-in components.

Alarm Journal:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/c/5c9ef2b197872e6838c516c1a85e4fa7696259e2.png)

Power Chart:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/700b1c323d0659e634f698893872e21ccea5fed7.png)

Maybe there are other components without that property.

Am I missing the way to do it or should we start a request on canny for it?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 17, 2023, 3:40pm UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/2 "2023-03-17T15:40:00Z")

</div>

If I recall correctly, the DateTime components have a locale only because they've been around since before we fully supported locales in Perspective as a whole.

All Perspective components are supposed to be locale-aware now without any configuration on your end, and they all use the locale of the session. If you look at the Session-level properties, you will see `props.locale`. This property is what all Perspective components tie into. At this point in time, the components which have their own `locale` property only use that property to _override_ the session locale setting, essentially ignoring the session locale and instead using whatever is supplied in this component-level setting.

If your goal is to override the session setting in those other components, we don't supply a way to do that. The only reason we even kept those `locale` props on the DateTime components was for backwards-compatibility purposes.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [March 17, 2023, 4:28pm UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/3 "2023-03-17T16:28:53Z")

</div>

I have been changing the locale for a while now. I don't see those built-in components changing with the locale, that's why a raised the question.

Those screenshots were taken with the locale "nb" in the designer, which don't use AM/PM. What could be preventing it from changing?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 17, 2023, 4:30pm UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/4 "2023-03-17T16:30:25Z")

</div>

I didn't test this, but Designer may not be using the locale. (It's not a full browser.) Test it in a web browser.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 17, 2023, 4:39pm UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/5 "2023-03-17T16:39:33Z")

</div>

Also, are you changing the session locale AND the DateTime component locale? If your session locale is `nb`, but your DateTime component is still using `en`, then your DateTime is going to use the `en` locale and not the browser. Bind `DateTimePicker.props.locale` against `session.props.locale` if you always want them to use the session locale.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [March 17, 2023, 4:43pm UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/6 "2023-03-17T16:43:44Z")

</div>

I'm not testing Date Time Picker, as it is possible to change the locale there. My main focus right now is Power Chart, Alarm Journal, and maybe other components that could also have a built-in date time picker.

> [@Transistor](#):
>
> I didn't test this, but Designer may not be using the locale. (It's not a full browser.) Test it in a web browser.

I've tested it in Chrome. I've also been using two languages for a while now, that's why it surprises me that it should have changed automatically from the beginning.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 17, 2023, 5:15pm UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/7 "2023-03-17T17:15:49Z")

</div>

Oh, so your question is regarding how to get the components which use any sort of built-in DateTime functionality to use the locale? No, they don't, and we're aware of it, with open internal tickets to bring them in-line with the stand-alone components.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [March 17, 2023, 5:23pm UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/8 "2023-03-17T17:23:18Z")

</div>

I hope it can be done sooner than later. I will start working around components to use the external Date Time Picker while is not ready.

---

<div class="post-metadata">

**Author:** ![BVTV](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@BVTV](https://forum.inductiveautomation.com/u/BVTV)\
**Post date:** [April 29, 2024, 8:33am UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/9 "2024-04-29T08:33:33Z")

</div>

I hope this is coming soon. I still have the problem in version 8.1.35. I am using the power chart and want to get rid of the AM/PM in the time range picker.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [April 29, 2024, 10:07am UTC](https://forum.inductiveautomation.com/t/ign-732-locale-for-datetime-picker-on-components/71212/10 "2024-04-29T10:07:30Z")

</div>

Added to voting system:

[https://inductiveautomation.canny.io/ignition-features-and-ideas/p/ign-732-locale-for-datetime-picker-on-components](https://inductiveautomation.canny.io/ignition-features-and-ideas/p/ign-732-locale-for-datetime-picker-on-components)
