cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Partisan
Post Partisan

Default date displayed for day

I'm creating a time sheet for employees within an organisation and I want to know is it possible that whenever a employee wants to add a new entry or edit a day for a specific day that it would only display the date on the given day. I have a button that will populate the time so I just want that date picker will automatically display the date for the day as well for the clock out button.

 

This is the set variable used for the clock in button: VarCurrentDateTime

And for the clock out button: VarCurrentDateTime2

1 REPLY 1
Super User II
Super User II

Is your Date Picker intended to allow them to change the date? If it's read-only, then I wouldn't even both with a Date Picker and would instead simply use a label that's in DisplayMode.View, with the value.

 

If you want/expect them to use the Date Picker to change the date, then you can simply set the DefaultDate property equal to your variables.

 

Depending on how they are formatted, you may need to convert them to a date friendly value.

  • "1/1/2020" would work
  • DateValue("1/1") would take that simple string and product 1/1/2020, 12:00 AM, and would work

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 (38,336)