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

Set variable to date picker's default date

Hi, 

 

On load of a screen, I want to set a variable (Set) to a date picker's default date, rather than SelectedDate. 

 

DatePicker1.DefaultDate doesn't seem to be a valid parameter. The point of this is so that, for my bookings app, the availability of this date (via a filter on the dataverse table) is determined on the datepicker's default date (which is set to DateAdd Today +1 [tomorrow]), before the user selects a date in the date picker.

 

Is this possible?

 

Thanks

K.

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks. I add Selected.Date to the OnVisible of the screen, and that seems to return its Default without being selected! 🙂

 

Thanks for your advice

K.

View solution in original post

2 REPLIES 2
timl
Super User
Super User

@Kosenurm 

I'm pretty sure this isn't possible because as you've found, DatePicker1.DefaultDate isn't a valid output property.

As an alternative, could you set the the value of a variable to (DateAdd Today +1) on the load of your screen, and then set the default property of your date picker control to the variable?

Thanks. I add Selected.Date to the OnVisible of the screen, and that seems to return its Default without being selected! 🙂

 

Thanks for your advice

K.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (5,611)