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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / BUG: Modern Control Da...
Power Apps
Suggested Answer

BUG: Modern Control DatePicker not resetting when not in Edit Mode

(0) ShareShare
ReportReport
Posted on by 87
Please can someone confirm this? this is the behavior I am seeing:
I have a modern datepicker that is not in a form control. I have a button that calls Reset() function to reset it. I noticed that it does not work when the control is in DisplayMode.View or Disabled. the only time I noticed it works is when the control in Edit Mode. 
 
also please did someone know how can we clear the selectedDate in different way? setting blank() or tweaking in the placeholder properties didnt do the trick unlike the old datepicker. it still shows the last set date
 
my workaround is to keep the control in edit mode and have a label overlay that is on top of it and control visibility to fake a view only behavior. 
 
 
Thanks is advanced
 
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    The Reset() function works only in DisplayMode.Edit, as this mode allows the control to accept changes.
     
    Remove the DatePicker control from the screen. Recreate a new DatePicker by toggling its visibility.
  • ialbasheir-kbr Profile Picture
    87 on at
    Thx but where did get that? I could not find anywhere in the documentation that reset is bound to displayMode in Edit.  I have all kinds of controls that reset() works regardless what Mode they are in.
  • pawelbakan Profile Picture
    12 on at
    Modern Controls are still very buggy. I had similar problem with number input. You can test this solutions.
     
    1. Remove your old DatePicker field and add new one.
     
    2. Set DatePicker DisplayMode parameter to variable, when you reset your fields just simply add:
     
    UpdateContext({varDisplayMode:DisplayMode.Edit});
    UpdateContext({varDisplayMode:DisplayMode.View})
     
    3. Set default value of DatePicker to varDatePickerValue. If you load this data from other source (like SP List or Dataverse), you go for UpdateContext({varDatePickerValue: YourSource.dateField}), then use UpdateContext to reset value.
     
    4. You can try to use second point and add reset function:
    UpdateContext...;
    Reset(DatePicker);
    UpdateContext...;
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard