cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mob
Advocate II
Advocate II

Datepicker change date format

We are using DatePicker , but we need to change the format of the displayed date, is this possible?

 

e.g. , we set it to local , but the format is not correct, it showes as e.g.  25/10/2016  but we need 25.10.2016 , just to keep consistency also with the web app and desktop app.

 

And also cause of our rest api (server) which accepts the date just with the dot "." delimiter.

 

Is this possible?

 

Just to know, if it is possible to change to  MM DD YYYY also?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
hpkeong
Community Champion
Community Champion

Hi

Is this something you want?

Hope it helps.

 

25.10.2016 = Text(DatePicker1.SelectedDate, "[$-en-US]dd.mm.yyyy")

 

25 10 2016 = Text(DatePicker1.SelectedDate, "[$-en-US]dd mm yyyy")

hpkeong

View solution in original post

3 REPLIES 3
hpkeong
Community Champion
Community Champion

Hi

Is this something you want?

Hope it helps.

 

25.10.2016 = Text(DatePicker1.SelectedDate, "[$-en-US]dd.mm.yyyy")

 

25 10 2016 = Text(DatePicker1.SelectedDate, "[$-en-US]dd mm yyyy")

hpkeong

View solution in original post

CarlosFigueira
Power Apps
Power Apps

Currently there's no way to change the way the date is displayed in the text box in the date picker control. It's displayed in the same way as a call to Text(DatePicker.SelectedDate, DateTimeFormat.ShortDate) would do. Please consider creating a new item in the PowerApps Ideas board for that feature (choosing how date is displayed) to be added to the control.

 

As a workaround (not ideal, see below), you could add a text box with a non-transparent background on top of the text portion of the date picker control, and that textbox would be displayed in any way you want (using the Text function as suggested by hpkeong). You can then set the text box Disabled property to true, and match the disabled colors with the (non-disabled) colors so that the control doesn't look disabled.

 

The problem with this approach is that you would lose the ability to open the calendar flyout to select the date when the user selects the text box (i.e., they'd need to tap on the calendar icon to open it). But if that's not an issue, then you may be able to use it.

 

The accepted solution is not a "solution" but a workaround. However it works.

 

I posted this funcitonality in "new ideas". Hope it will come soon.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,960)