web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error in SelectedDate ...
Power Apps
Answered

Error in SelectedDate property of DatePicker Canvas within a Gallery

(0) ShareShare
ReportReport
Posted on by
I'm trying to create a component that uses a gallery, and one of its items contains a Modern DatePicker Canvas.
This control is producing an inexplicable error.
 
I placed this code in the SelectedDate property of the control (note that the code returns the date 11/2/2026, 12:00:00).
 
 
When I select a date later than the date in the SelectedDate property of the right Modern DatePicker Canvas in the left Modern DatePicker Canvas, the date in the SelectedDate property of the right Modern DatePicker Canvas is blanked (note that the code returns "En blanco"), but the right Modern DatePicker Canvas continues to behave as if it has the initial date set in its SelectedDate property (i.e., 11/2/2026, 12:00:00).
 
 
I've reset the Modern DatePicker Canvas on the right after trying to clear the date in its SelectedDate property in multiple ways to reflect the new value (I even set 'Reset(dtePckFilterItemUntil)' in its OnChange property, which caused the control to reset to its initial date - 11/2/2026, 12:00:00 - every time I select a new date, it doesn't clear).
 
Has anyone else experienced this?
 
Does anyone know how to solve this problem?
 
I hope someone can provide a solution.
I have the same question (0)
  • Kalathiya Profile Picture
    2,279 Super User 2026 Season 1 on at

    Try setting the logic on DefaultDate and explicitly returning Blank when the date isn’t found. For example:

    Default Date:

    With(
        {
            d:
                LookUp(
                    LookUp(colFilterItems; ID = 5).Items;
                    ID = Last(LookUp(colFilterItems; ID = 5).DefaultItemsIDs).Value
                ).Value
        };
        If(
            IsBlank(d);
            Blank();
            DateValue(d)
        )
    )
    //Please update the collection name and column name if it's wrong.
    if the lookup doesn’t find a date, it will be empty. 
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
  • Verified answer
    WarrenBelz Profile Picture
    155,479 Most Valuable Professional on at
    There are two issues here - firstly, I believe this is a Modern Date Picker bug - they do not reset properly. To establish whether this is the case with you, use a Classic Date Picker and see if that works.
    The second issue is that controls inside a Component do not have direct access to data sources - you may have worked around this, but the easiest way to test is put the same objects in the app itself and see what works there.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 432

#2
Valantis Profile Picture

Valantis 362

#3
timl Profile Picture

timl 337 Super User 2026 Season 1

Last 30 days Overall leaderboard