cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BenAu
Helper I
Helper I

PowerApps for teams datepicker in web canvas apps

Hi,

 

Bit of an of an odd one, based on a thread here, i found out you can copy the fluent ui fields from powerapps for teams into the standard web powerapps editor.

 

We want to use the new fields as they are much more user friendly when compared to the the classic controls, especially the date picker.

 

I have everything working but have ran into an issue where the published web app does not format the datepicker based on our location "dd/MM/yyyy". 

 

It does format correctly when in the editor though:

 

Editor:

BenAu_0-1638833030719.png

Player:

BenAu_1-1638833052910.png

 

Would anyone have any idea on how to get the formatting to display correctly or is this a dead end?

 

I have tried:

Text(DateTimeValue(Parent.Default),"[$-en-GB]dd/mm/yyyy", "en-GB") in the value and onchange of the field.

 

Have tried Text(DateTimeValue(ThisItem.'Event End Date'),"[$-en-GB]dd/mm/yyyy", "en-GB") in the default of the parent card to.

 

Any guidance will be appreciated.

4 REPLIES 4
JR-BejeweledOne
Super User
Super User

It is my experience that it SHOULD display based on the browser setting.  As long as you are not using any sort of text function.  

 

If you are setting it to the date in a text field, try wrapping that in DateValue(Parent.Default)

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
BenAu
Helper I
Helper I

Is this case, the new date picker is not displaying based on any region setting when using the published app it is when in the app editor though. The classic date picker displays correctly in both.

 

Checked my machines location which is correct and the location within my M365 profile.

 

It only happens on the picker itself, I can convert text fields fine but we are trying to get the value in the form field to be correct.

 

If its useful I have noticed then when in the Teams PowerApps editor where I copy the fluent UI fields from the date fields also appear in the wrong format. 

 

Thanks

Ben

JR-BejeweledOne
Super User
Super User

Edited:

 

It definitely doesn't appear to be working as it should.   It doesn't appear to respect the browser language.  I do have the standard date picker working properly in published apps though.

 

I did notice however after editing and saving the app this image came from a couple times, the fluent UI control is now displaying the date correctly in edit mode.    I have another app however that uses the standard date picker and it's not correctly recognizing the browser language IF it is one of the English language variations.   Until today it wasn't recognizing it in either edit or published mode.   It is now recognizing it in edit mode but not published mode.   I suspect that browser caching may have a lot to do with it.

 

DateFormat.jpg



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
BenAu
Helper I
Helper I

Hmm so basically, its not really reliable at this point in time to use the fluent UI control in a web app.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,384)