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 Sage
Solution Sage

PowerSäm
Responsive Resident
Responsive Resident

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
Super User
Super User

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)
)

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,684)