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
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,543)