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

Need help with my first project - need Datepicker with first/last day of month

Hello,

 

i want to show date in gallery - for this i want to create a datepicker and select the first day of this month and an datepicker with the last day of this month selected.

 

Thanks a lot for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
pleibling
Helper I
Helper I

This works for me:

 

DatePicker1 (From):

Date(Year(Now()); Month(Now()); 1)

 

DatePicker2 (To, Today default):

Today()

 

Get Items in Gallery until this Time:


Filter(
'DataSource';
(Date_column_in_datasource >= DatePicker1.SelectedDate) && (Date_column_in_datasource <= DatePicker2.SelectedDate)
)

View solution in original post

7 REPLIES 7
KvB1
Solution Specialist
Solution Specialist

PowerSäm
Advocate III
Advocate III

Hi @pleibling ,
this will probably help you. You can simply download the component and paste it into your PowerApps. This is a DatePicker with several options.

 

https://www.youtube.com/watch?v=pl1YoItT1VM

zmansuri
Community Champion
Community Champion

Write this in Datepicker1 DefaultDate Property:

 

Date(Year(Now()), Month(Now()), 1)

 

Write this in Datepicker2 DefaultDate Property:

 

DateAdd(
DateAdd(
Date(Year(Now()),Month(Now()),1),
1,
Months
),
-1,
Days
)

Thanks for your help, but i want to try it first with built in options. Thanks.

Many thanks for your fast reply - i try this, but it doesn't work. I add an Datepicker called Datepicker1 and at DefaultDate i insert: Date(Year(Now()), Month(Now()), 1)

 

But it show me an error. If i try it own and wrote today(), this works and it show this possibility with autocompletion - if i wrote date( there show no autocompletion. I try to inser date(1974,12,10) but gets to an error.

 

Whats the error? Did i have to set something other?

Looks like this:date.png

pleibling
Helper I
Helper I

This works for me:

 

DatePicker1 (From):

Date(Year(Now()); Month(Now()); 1)

 

DatePicker2 (To, Today default):

Today()

 

Get Items in Gallery until this Time:


Filter(
'DataSource';
(Date_column_in_datasource >= DatePicker1.SelectedDate) && (Date_column_in_datasource <= DatePicker2.SelectedDate)
)

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,517)