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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Date and Time field in...
Power Pages
Answered

Date and Time field in form

(1) ShareShare
ReportReport
Posted on by 33
I have a requirement for a date and time field in a powerpages form.  It's not an automatic timestamp it's a field where the user enters the date and a particular time.  What's the best way to do this?  The corresponding DV field  where the data goes is a date/time field
Categories:
I have the same question (0)
  • Suggested answer
    Fubar Profile Picture
    8,379 Super User 2025 Season 2 on at
    Not sure what you are actually after, if you want the portal user to enter a Date-time, then you have a Date field in Dataverse configured to not be Date only, add it to your form, and the portal will render a datetimepicker control for the user.
    Or do you want to populate it with data rather than the user entering the data (or default it to a value)?
    Or are you thinking you want 2 fields one for date one for time (this will be more difficult)?
  • Suggested answer
    GWham Profile Picture
    58 Moderator on at
    Place a date field on your form and the portal will render a date/time picker.
     
    if you want to set it to a specific date you can use:
    $("#your_fieldname").next().data("DateTimePicker").defaultDate(new Date("2020-01-01"));
     
     
     
  • CU01101113-0 Profile Picture
    2 on at
    ok so  maybe I didn't explain it properly.
     
    My column in Dataverse is Date and Time.    At the Power Pages End I require the users to manually enter a date and a time.   The date picker only allows for date and automatically time stamps the time that they choose a date. I need them to be able to manually enter a specific time as well as date.
     
    In powerapps when I have requirement I just use drop downs with 24 and 60 items r..and then concatenate it with the date picker I just thought that maybe in Power Pages there maybe a better way to do it?
     
    thanks
     
     
  • Verified answer
    Fubar Profile Picture
    8,379 Super User 2025 Season 2 on at
    If your dataverse Date is set to be Date Time (and is not set to Date only), then by default you should see the following, note the clock in red circle allows you to set Time.
     
     
    With JavaScript/JQuery you can also tell it to display the time side-by-side so rather than the button it appears to the right of the dates without a button click.
     
    $("#field_schemaname").next().data("DateTimePicker").sideBySide(true)
     
  • DBNL Profile Picture
    33 on at
    Perfect thank you Fubar

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 89 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard