web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power App datepicker s...
Power Apps
Answered

Power App datepicker strict from any device

(0) ShareShare
ReportReport
Posted on by 50

Hello community and congratulation,

I have an issue on my PA in my company.

I need to fixed a datepicker time,  to prevent someone that has changed his local device date (mobile or PC) when using my app?

Categories:
I have the same question (0)
  • Fardy_MADI_2 Profile Picture
    334 Super User 2024 Season 1 on at

    Hi @ipapoutsidis,

     

    The powerApps function Today() and Now() return the local device date and date-time.

    So you should use an API (like this one https://timeapi.io/swagger/index.html) to get the current date time and compare the two values.

     

    Hope this will help you 🙂

  • ipapoutsidis Profile Picture
    50 on at

    Thanks @Fardy1  I will try it!

  • ipapoutsidis Profile Picture
    50 on at

    @Fardy1  Do you have any sample to provide? Or anyone else!!

    I will appreciate it!!

  • Verified answer
    Fardy_MADI_2 Profile Picture
    334 Super User 2024 Season 1 on at

    Hi @ipapoutsidis,

     

    You need to create a custom connector that call this API https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam. Here you can find a good tutorial to make one : https://www.alphabold.com/creating-a-custom-connector-for-power-apps/

     

    Then you just have to add the connector in your apps whit this formula

    APIName.datetime({timeZone:"Europe/Amsterdam"}).dateTime 

     

     

    The issue of this solution is that it's using a premium connector.

    I think of an other free solution. You can create a Sharepoint list, you add a line on start off the app of any value like User().FullName and verify the date of modification included in Sharepoint. I don't now if Sharepoint use the local system date or the real date.

    If you don't have the Power Apps premium licence, you can test it and tell me if it works pls.

  • Verified answer
    ipapoutsidis Profile Picture
    50 on at

    Thnaks @Fardy1  it does work 

  • ipapoutsidis Profile Picture
    50 on at

    @Fardy1 Is to muh to ask you, how I can make to add 2 only more days in my date picker app, 

  • Fardy_MADI_2 Profile Picture
    334 Super User 2024 Season 1 on at

    Do you mean you want to compare the real date with Local system date +/- 1 day ?

  • ipapoutsidis Profile Picture
    50 on at

    @Fardy1  before adding the api I hadth Today() for use the maxdate Today() +2, I want make it the same as with Today function when someone click to reserve daysI want him/her have restriction for today plus 2 days!

  • Verified answer
    ipapoutsidis Profile Picture
    50 on at

    @Fardy1  I have found the solution for my issue: DateValue(currentDate) +2

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard