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 / Date Picker Modern Con...
Power Apps
Answered

Date Picker Modern Control - default hour

(0) ShareShare
ReportReport
Posted on by

Hello everyone, has anyone figured out to set the default hour when opening the form in 'New' mode 

 

current DefaultSelectedItems is - 

[Text(Hour(Parent.Default),"00")]
i would like to set the StartDateHour to 7:00am and the EndDateHour to 5:00pm
 
i have StartDate set to - 
If(IsBlank(Parent.Default), Today(), Parent.Default), this seems to work for the Date field.
 
thanks in advance 
Categories:
  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @vandam2 ,

    It would be something like

    If(
     YourFormName.Mode = FormMode.New,
     "07",
     Text(Hour(Parent.Default),"00")
    )

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • vandam2 Profile Picture
    on at

    Hello Warren, when i try to add this to 'DefaultSelecteItems propery for the StartDateHour field, i get an error stating 'Expected Table Value', am i putting the formula in the right spot?  

     

    also attached image 

    If(
       Form1.Mode = FormMode.New,
       "07",
       Text(Hour(Parent.Default),"00")
    )
     
    StartDateHour.png
     
  • Verified answer
    WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @vandam2 ,

    I was expecting a drop-down (not a Combo Box)

    {
     Value:
     If(
     Form1.Mode = FormMode.New,
     "07",
     Text(Hour(Parent.Default),"00")
     )
    }

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • vandam2 Profile Picture
    on at

    the script worked when i moved the "07" to the second part, Text(Hour(Parent.Default),"07")

     

    Thank you Warren

     

    {
       Value:
       If(
          Form1.Mode = FormMode.New,
          "00",
          Text(Hour(Parent.Default),"07")
       )
    }

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
timl Profile Picture

timl 122 Super User 2026 Season 2

Last 30 days Overall leaderboard