Where/what/how is it determined how a date is displayed in the date picker?
My computer settings are all for New Zealand locale, region, time zone, date format, the whole bundle. Everything is New Zealand. Same on my phone. Region, language, date, all set to New Zealand.
When I format a date value with Text(vFilterDate,"dd mmm yyyy") PowerApps Studio unhelpfully auto-corrects that to Text(vFilterDate,"[$-en-NZ]dd mmm yyyy") and then promptly complains that Language code en-NZ not supported. Well, if it's not supported, then don't put it in. OK, I can change it to en-US, but the month name still shows as may with a lower case m instead of May with an upper case M.
More aggravating is the date picker. When I default the date picker to Today() it shows as may 23, 2017, again with all lower case. I could live with the M/D order, but the lower case month name really gets to me.
How can I change this? I'm aware of the overlaying text box hack, but REALLY? (also, that would still show the month in lower case).There must be a way that the date picker is location aware. And when I'm in NZ and the app recognises that, then please also recognise the language code. This is bizzarre.
Please tell me how such trivial formatting can be achieved.
I've had the same issues over here in AUS, while I don't have a solution in fixing up the formatting, I might have one better.
What I do is shink the datepicker to just the calendar icon and add an input box where the text field used to be. I then set the default property of the text box to:
By using an input box I also let my users type in dates which seriously annoyed me about the standard datepicker. To ensure validity of the entered text I set the border colour property of the input box to:
///This makes sure the text is in the right format dd/mm/yyyy with basic validation
&& (Text(Month(DateValue(EventApportion_Inp_SchedDate.Text, "en-GB")), "[$-en-US]00") = Mid(EventApportion_Inp_SchedDate.Text, 4,2))
///This makes sure the users haven't entered something stupid like 38/02/2015
&& (Text(Year(DateValue(EventApportion_Inp_SchedDate.Text, "en-GB")), "[$-en-US]0000") = Mid(EventApportion_Inp_SchedDate.Text, 7,4)),
///This makes sure the users haven't entered something stupid like 20/16/2015
///if it is valid ie all the above are true then set the colour to my border colour otherwise red
By using the above two things you can both fix up the shocking format limits, as well as allowing users to manually type in / copy paste dates. It is a bit more finiky but yeah. That said if you use mmm you still get lower case which will still drive you nuts. You could use Proper on it tho to fix it up.
Hope that helps somewhat.
You need the improved DatePIcker coming in v640, which will let you specify "en-US" for display.
What you are seeing is that PA is choosing "en" as the locale (as "en-NZ" is not supported), and the month names for "en" are lower-case.
I cannot rationlise the lower-case on "en", its never looked right to me.
Pushing an unsupported locale into the s is a bug. In fact it shouldn't bother at all for date/time strings, it only makes a difference to numeric format strings.
Have just posted a similar question regarding the lower case issue with the DatePicker and got this answer back from @CarlosFigueira which worked for me
I also encountered the other issue re the Text function for dates and found this (although tedious) it worked OK
Like you and @ShaneCluning, am also based in Aus/NZ
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights