cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to set current date as default date in date picker everytime page loads

How to set current date as default date in date picker everytime page loads?

14 REPLIES 14
Anonymous
Not applicable

Hi,

 

But my customised Form only has one screen and items are added on sharepoint list and viewed from sharepoint list. 

When trying to view previous requests the datepicker is changing to today's date.

 

Thanks,

MK

 

In your case then you'd reference the mode of the SharePoint form:

If(
    SharePointForm1.Mode = FormMode.New,
    Today(),
    Parent.Default)

The mode property of that form will vary depending on whether it's being used to add a new item or to edit an existing one.

New Member

how can get timestamp in date picker?

Set DefaultDate of Date Picker to:

Now()

That should be 

UpdateContext({currentDate: Today() - 1}); UpdateContext({currentDate: Today()});

not a comma after currentDate:

UpdateContext({currentDate: Today() - 1}); UpdateContext({currentDate, Today()});

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (67,077)