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 Apps
Unanswered

Clear date value

(0) ShareShare
ReportReport
Posted on by 284

 Hi,

 

I have a date field with datepicker in the edit form. I can clear the datepicker but when I clicked submit, the date field is not blank.

I tried to patch but it is not working too. I used "Blank()" as advise by user in the forum also not working. Any advise?

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Fields in the Editform pick it source from the database. So if the connected table in the database for the date is not blank, then the DatePicker cannot be blank in Editform.

     

    If however clearing means changing the form mode from Edit to new, then in the Default Date put;

    If(EditformName.Mode=FormMode.New,Blank(),Parent.Default)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • sbgoh Profile Picture
    284 on at

    Hi @eka24 ,

    I can clear on the datepicker but I cannot save the blank value in my sharepoint list.

  • eka24 Profile Picture
    20,923 on at

    Can you Display the formula you are using. Is the date column in Sharepointlist required?

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • sbgoh Profile Picture
    284 on at

    Hi @eka24,

     

    The field is a date column in Sharepoint and it is not mandatory field.  I didn't have any specific formula.

    sbgoh_0-1599231471616.png

    sbgoh_1-1599231551962.png

     

     

  • eka24 Profile Picture
    20,923 on at

    Your initial Post states you are using an edit form. Does it mean the DatePicker is not part of the form?

    Can you show a screenshot of the form

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @sbgoh ,

     

    Delete the date text from the Date Picker control doesn't mean to clear the selected date. 

    To implement your needs, you have to add an extra Remove button in the data card to clear the selected date. Please refer to the following steps.

    1. Unlock the data card, insert a Cancel icon

    2. Set Icon.OnSelect: Set(vardate,Blank())

    3. Set DatePicker.DefaultDate: If(IsBlank(vardate),vardate,Parent.Default)

    4. Set DatePicker.OnChange: Set(vardate,1)

    5. Enable the "Formula Level error management" in Advanced Setting. (Important!)

    Snipaste_2020-09-11_15-50-09.png

    Hope this helps.

    Sik

  • sbgoh Profile Picture
    284 on at

    When I enabled the "Formula Level error management" in Advanced Setting, my other dropdown list behave very weird. It is save properly or changed when I edit a record.

  • BPNJMC1 Profile Picture
    72 on at

    @sbgoh,

     

    After turning on the Formula-Level Error Management experimental feature as you suggested, I was able to save empty/null dates after doing only the following:

    1. Clear out DatePicker.InputTextPlaceHolder
    2. Set DatePicker.IsEditable = True

    I didn't need to create a cancel icon.

     

    J

  • Zaki89 Profile Picture
    13 on at

    I had the same issue before. i just turned on "Formula-level error management" then it worked. Please try it 

  • DrummingAddict Profile Picture
    19 on at

    I would just like to append this response with adding Set(varDate,1) to the OnVisible property of the page the date picker is on so it will populate the default on initial rendering of the page.

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard