How To Set Default Date in Power Apps Date Picker

This Power Apps tutorial will show you how to set a default date in the Power Apps date picker control.

While working with the Power Apps Canvas app, I needed to set a default date in the Power Apps Date Picker Control.

In addition, we will go over how to set a default date within the Power Apps date picker control, as shown below.

  • What is PowerApps date picker default?
  • How to set the default date as today in the PowerApps date picker?
  • How to set a default date within the PowerApps date picker?
  • How to reset to the default within the PowerApps date picker?
  • How to set the default as blank within the PowerApps date picker?
  • How to set the default date as yesterday inside the PowerApps date picker?
  • How to display the default date as a long date in the PowerApps date picker?
  • How to set the default as a future date within the PowerApps date picker?

PowerApps date picker default

In Power Apps, we can find a Default property in certain controls such as Date Picker, Dropdown, checkbox, Listbox, text input, radio button, etc.

The default function is used to make it easier to fill out a data entry form. This function returns a record containing the data source’s default values.

Similarly, we can find the DefaultDate property under the Power Apps date picker control, which is similar to the Default property. It displays the initial value of a date control unless modified by the user.

PowerApps date picker default Today

When we add a date picker control to a Power Apps screen, it will display the current date by default.

Also, we can see that the DefaultDate property is set to Today(), which will display the current date, which will change dynamically depending on the timezone.

DefaultDate = Today()
PowerApps date picker default today
PowerApps date picker default today

We don’t need to update the date to today because it will do so automatically. This is how to set the default date to Today within the Power Apps date picker control.

Also Read: How to disable Power Apps date picker

PowerApps date picker default date

Apart from setting the default date as the current date, the Power Apps Date picker control allows us to set a different date as the default date.

To set a different date as the default, follow these steps:

  • On the Power Apps screen, add a date picker control.
  • By default, it will display today’s date (i.e., 11/15/2022). Suppose, we want to set another date as the default date(i.e., 11/17/2022).
  • For this, insert the specified date on the date picker’s DefaultDate property using a Date(). The syntax for the Date() is:
Date(Year, Month, Day)
  • Let’s insert the specific date into the DefaultDate property below:
DefaultDate = Date(2022, 11, 17)
PowerApps date picker default date
PowerApps date picker default date

Now, save and close the app. Whenever the user opens the app, it will display the specified date by default.

Power Apps date picker default date
Power Apps date picker default date

This is how to set the default date within the Power Apps date picker control.

Check out: [Solved]Can’t convert this data type. Power Apps can’t convert this Date to a Boolean

PowerApps date picker reset to default

In this section, we will see how to work with Power Apps date picker reset to default. That means when the user resets the Power Apps date picker control, it will reset and display the default date.

To implement this requirement, the following steps are:

  • On the Power Apps screen, add a date picker control. By default, the control will display the current date.
  • Also, add a button control or reset icon to the screen and place it near the date picker control. As a result, when the user clicks the button, the date picker control is reset and the default date is returned.
PowerApps date picker reset to default
PowerApps date picker reset to default
  • Insert the below expression on the reset icon’s OnSelect property to reset the Power Apps date picker control.
OnSelect = Reset(DatePicker1)

Where DatePicker1 is the name of the Power Apps date picker control.

Power Apps date picker reset to default
Power Apps date picker reset to default

Let’s save the app and preview it. Select a date from the date picker control (11/11/2022) and click on the icon. We can see that it will reset the control and return the default date, i.e., today’s date.

Power Apps date picker reset to default date
Power Apps date picker reset to the default date

This is how to reset the Power Apps date picker control to the default date.

We recently published an article explaining how to Reset Power Apps Date Picker. This article explained how to reset the Power Apps date picker control based on various scenarios. We recommend that you click on the mentioned link for more information on how to reset the date picker controls.

PowerApps date picker default blank

In some cases, we may need to leave the Power Apps date picker control’s default value blank. That means, when the user opens an app, the date picker will appear blank and it will let the user select the date as per their requirement.

To work with this requirement, the following the steps are:

  • On the Power Apps screen, add a date picker control.
  • Insert the below expression on the DefaultDate property of the date picker control.
DefaultDate = Blank()
PowerApps date picker default blank
PowerApps date picker default blank

That’s it! Sabe and close the app. We can see when we open this app, the date picker will display as blank shown below:

Power Apps Datepicker set a deafult as blank value
Power Apps Datepicker set default as a blank value

This is how to set a default as a blank value within the Power Apps Datepicker control.

Have a look: How to Patch Power Apps Date Picker

PowerApps date picker default long date

In this section, we’ll look at how to make a date in a long date format the default in the Power Apps date picker control.

That is, we will set today’s date as the default date, which will appear in a long date format, i.e., Tuesday, November 15, 2022, rather than the short date, 11/15/2022.

To work with this requirement, the following steps are:

  • Add a date picker control to the Power Apps screen. As we can see, it will display the current date as the default in a short-date format.
PowerApps date picker default longdate
PowerApps date picker default longdate
  • To display the default date in long date format, insert the following expression on the date picker control’s Format property.
Format = DateTimeFormat.LongDate

We can see the default date will appear in longdate format below:

Power Apps date picker default longdate
Power Apps date picker default long date

Save and close the app for now. When we open the app, we can see by default the current date appears in a long date format.

This is how to set the default date in a long date format within the Power Apps date picker control.

Also Check: How to Reset Power Apps Date Picker

PowerApps date picker default yesterday

In this example, we’ll look at how to make yesterday’s date the default in the Power Apps date picker control. That is, when the user launches the app, the date picker will show a default date that is one day before the current date.

Suppose, if the current date is 11/15/2022, then the date picker will display the default date as 11/14/2022. To work with this scenario, the following steps are:

  • Add a date picker control to the Power Apps screen.
  • Insert the below expression on the control’s DefaultDate property.
DefaultDate = Today() - 1

As we can see, once the formula is inserted the default date is set to yesterday’s date shown below:

PowerApps date picker default yesterday
PowerApps date picker default yesterday

This is how to set the default date as yesterday’s date within the Power Apps date picker control.

Read: Power Apps Checkbox control within Gallery

PowerApps date picker default future date

In the above example, we have seen how to set yesterday’s date as default within the Power Apps date picker control.

Similarly, inside the Power Apps date picker control, we can set a future date as the default date. Assume we want to set a default date that is 10 days after the current date.

For this, insert the following steps are:

  • On the Power Apps screen, add a date picker control.
  • Insert the below expression on the control’s DefaultDate property.
DefaultDate = Today() + 10

When the expression is entered, the Power Apps date picker control displays the default date that is 10 days after the current date.

PowerApps date picker default future date
PowerApps date picker default future date

This is how to work with Power Apps date picker default future date.

Furthermore, you may like some more Power Apps tutorials:

Conclusion

We learned how to set a default date within the Power Apps date picker control based on different scenarios in this Power Apps Tutorial.

  • PowerApps date picker default
  • PowerApps date picker default today
  • PowerApps date picker default date
  • PowerApps date picker reset to default
  • PowerApps date picker default blank
  • PowerApps date picker default yesterday
  • PowerApps date picker default long date
  • PowerApps date picker default future date
  • Thanks for the date picker instructions. Learned a lot
    I use the campus application a lot so need this kind of tips

    Appreciated
    Yuriko

  • >