I have an application that can be configured to use many languages ('en', 'fr', 'it'), my question is: how can I set the format of the date and time in input of type date or datetime-local dynamically with javascript to match the language of the application and not the language of the browser or the OS?
Asked
Active
Viewed 54 times
0
-
What do you mean by "match the language of the application"? – Mitya May 04 '17 at 11:50
-
Think of it as a variable: if ('en') else if ('fr') and so on – zied hajsalah May 04 '17 at 11:51
-
Well it's next to impossible to help without seeing your code. You're likely to get people helping if you post it. – Mitya May 04 '17 at 11:51
-
Check out momentJS. https://momentjs.com/docs/#/i18n/ – Jeremy Thille May 04 '17 at 11:53
-
I do not write any code yet. What I mean here: there is any way to set the local of the input programmatically with javascript? – zied hajsalah May 04 '17 at 11:53
-
@JeremyThille I need to customize the input field not the strings – zied hajsalah May 04 '17 at 11:55
-
@GavinBrelstaff same response as JeremyThille – zied hajsalah May 04 '17 at 11:57