cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

date picker month showing all lower case and other date format grievings

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. 

 

5 REPLIES 5
Highlighted
Frequent Visitor

Re: date picker month showing all lower case and other date format grievings

Hi IngeborgNZ,

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:
Text(EventApportion_DtePckr_ProjectSchedBdgtDate.SelectedDate,"[$-en-US]dd/mm/yyyy")

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:

 

If(
IsMatch(EventApportion_Inp_SchedDate.Text, "[0-3][0-9]\/[0-1][0-9]\/20[0-9][0-9]")

///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

First(Collect_Colours).Borders, DarkRed)

///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.

 

Cheers,

Shane

Highlighted
Power Apps
Power Apps

Re: date picker month showing all lower case and other date format grievings

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.

Highlighted
Helper II
Helper II

Re: date picker month showing all lower case and other date format grievings

@AndyPennell Why (for crying out loud), are the month names lower case??? This is not correct English. Not even American English.

 

And why is PA pushing an unsupported locale into the formula? 

 

@ShaneCluning I'll give that a go. Thanks for posting all the details, especially for the RegExp.

 

 

Highlighted
Power Apps
Power Apps

Re: date picker month showing all lower case and other date format grievings

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.

Highlighted
Advocate III
Advocate III

Re: date picker month showing all lower case and other date format grievings

Hi @IngeborgNZ

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

https://powerusers.microsoft.com/t5/PowerApps-Forum/Datepicker-formatting-first-character-month-name...

 

I also encountered the other issue re the Text function for dates and found this (although tedious) it worked OK

Text(ThisItem.DateReported,"[$-en-US]dd/mm/yyyy","en-GB")

 

Like you and @ShaneCluning, am also based in Aus/NZ

 

cheers

 

Richard

 

 

 

 

 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,354)