cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Date picker question

How can I display dates like below (in Red)  example after I select a date from the date picker:

 

Example: Selected date is: 22/10/2018 Screen Shot 2018-10-25 at 9.45.42 AM.png

 

Result:

 Monday 22/10               Tuesday 23/10               Wednesday 24/10               Thursday 25/10               Friday 26/10

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps
Power Apps

Do you want to select a date, and show that date and the four subsequent dates? You can use a horizontal gallery with the following expression for its Items property:

AddColumns(
    [0,1,2,3,4],
    "Date",
    DateAdd(
        DatePicker1.SelectedDate,
        Value,
        Days))

And inside the gallery template you can have a pair of labels, with the following values for their respective Text properties:

Text(ThisItem.Date, "dddd") // Name of the day of week
Text(ThisItem.Date, "dd/mm") // Day/month

And you can format the day/month label to show the date in Red.

Another option is to use the HTML Text control and have both pieces of information as a single control, using this expression for its HtmlText property:

Text(ThisItem.Date, "dddd") &
    " <b><font color='red'>" &
    Text(ThisItem.Date, "dd/mm") &
    "</font></b>"

The attached app shows both alternatives.

View solution in original post

1 REPLY 1
Power Apps
Power Apps

Do you want to select a date, and show that date and the four subsequent dates? You can use a horizontal gallery with the following expression for its Items property:

AddColumns(
    [0,1,2,3,4],
    "Date",
    DateAdd(
        DatePicker1.SelectedDate,
        Value,
        Days))

And inside the gallery template you can have a pair of labels, with the following values for their respective Text properties:

Text(ThisItem.Date, "dddd") // Name of the day of week
Text(ThisItem.Date, "dd/mm") // Day/month

And you can format the day/month label to show the date in Red.

Another option is to use the HTML Text control and have both pieces of information as a single control, using this expression for its HtmlText property:

Text(ThisItem.Date, "dddd") &
    " <b><font color='red'>" &
    Text(ThisItem.Date, "dd/mm") &
    "</font></b>"

The attached app shows both alternatives.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,336)