cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tism
Level: Powered On

Date Picker Hint Text

Hi,

 

Is there any way to set/change/remove the "HintText" for a date picker?

 

I have created a customized SharePoint form in PowerApps, and I have two fields on the SharePoint list: "Commencement Date" and "End Date".  The fields are not mandatory, and have been configured with a default of "(None)".

 

When you go to create a new list item, the customized PowerApps form appears, and for each date field shows a hint text of "31/12/2001" (The date format for the date pickers is "dd/mm/yyyy").  This is confusing users, as they are trying to specify "No Date" somehow.

 

It's also confusing them even more when they view an existing list item, because even though no date was set, it's still showing as "31/12/2001".  Even though the date appears greyed out, it's not obvious to the user that "no date" was set.

 

Is there a way to fix this?  I.e., if no date is selected or set when creating/viewing a list item, to show the field as blank? (rather than the hint text date it's showing now).

 

HintTextDate2.PNGForm in Display ModeHintTextDate.PNGForm in Edit Mode

 

 

Thanks!

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
tism
Level: Powered On

Re: Date Picker Hint Text

mr-dang
Level 10

Re: Date Picker Hint Text

@gokello

 

I think I understand the discrepancy here. 

If you create a 3 screen app from a SharePoint list, you will not encounter this problem because the View Gallery has a label instead of a DatePicker. The label has autoheight enabled, which means if there is no content for a date, the card itself is flattened so you do not see a date.

form - date picker hint.png

 

If you create a customized form from a SharePoint list, the Form control changes between New, View, and Edit modes. When the form changes to View mode, the datepicker itself does not disappear since it is not a label with autoheight. It becomes greyed out, but the hint text remains.

form - date picker hint 2.png

 

 

I'd say it's a bug that the hint text remains. It should be blank, but the datepicker should remain there to occupy space.

 

In the mean time, one workaround you can use is to hide the datepicker if its contents are blank and it's in view mode:

If(Parent.DisplayMode=DisplayMode.View,
    !IsBlank(Parent.Default),
    true
)

This means if the card is in view mode, check if the datepicker is blank. If it's not, show the datepicker.

Alternatively, you can use a condition for the FormMode of the form itself--if the entire form is in View Mode, then show the datepicker.

 

Let me know if this works for you.

 

Brian

Microsoft Employee
@8bitclassroom
11 REPLIES 11
Community Support Team
Community Support Team

Re: Date Picker Hint Text

Hi @tism,

 

I have checked on all the properties of date picker and it seems that there is not one that could edit this HintText. Changing the default property won't change this text. Please post an idea in the PowerApps Ideas forum, so it might be considered for future releases.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona Li

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tism
Level: Powered On

Re: Date Picker Hint Text

gokello
Level 8

Re: Date Picker Hint Text

Hi @mr-dang, how do you deal with this in your apps?

the default date 12/31/2001 is quite confusing to users.  

 

Whats the best way to hide it?

 

 

mr-dang
Level 10

Re: Date Picker Hint Text

@gokello

 

I think I understand the discrepancy here. 

If you create a 3 screen app from a SharePoint list, you will not encounter this problem because the View Gallery has a label instead of a DatePicker. The label has autoheight enabled, which means if there is no content for a date, the card itself is flattened so you do not see a date.

form - date picker hint.png

 

If you create a customized form from a SharePoint list, the Form control changes between New, View, and Edit modes. When the form changes to View mode, the datepicker itself does not disappear since it is not a label with autoheight. It becomes greyed out, but the hint text remains.

form - date picker hint 2.png

 

 

I'd say it's a bug that the hint text remains. It should be blank, but the datepicker should remain there to occupy space.

 

In the mean time, one workaround you can use is to hide the datepicker if its contents are blank and it's in view mode:

If(Parent.DisplayMode=DisplayMode.View,
    !IsBlank(Parent.Default),
    true
)

This means if the card is in view mode, check if the datepicker is blank. If it's not, show the datepicker.

Alternatively, you can use a condition for the FormMode of the form itself--if the entire form is in View Mode, then show the datepicker.

 

Let me know if this works for you.

 

Brian

Microsoft Employee
@8bitclassroom
gokello
Level 8

Re: Date Picker Hint Text

Hi @mr-dang, Thanks so much for the insight and proposed workaround.  

 

This works in view mode.. but not in Edit mode.

However in my case I didn't want the 'Hint Date' in Edit mode.

 

For now I will treat it as such - 'Hint Date Format'

gokello
Level 8

Re: Date Picker Hint Text

Hi @mr-dang,

Is there a way to modify the "Hint Text" for the Date Field?

mr-dang
Level 10

Re: Date Picker Hint Text

Hi Gilbert,

A Hint Text property does not exist today. The only work around I can think of is to show a label with the text you want when you put the form into View mode.

 

You can place a label behind the datepicker control. Make the datepicker have a transparent Fill so the label shows up. Hide the label or Fill the datepicker if has a selection.

 

This is not ideal but it can be done today. I am tracking this bug as #3180062 and will let you know any updates.

Microsoft Employee
@8bitclassroom
SunnyJoat
Level: Powered On

Re: Date Picker Hint Text

Look forward to the HintText for date controls feature being added.

 

Meanwhile, we can make the user experience of the date control a little more intuitive by playing around with the control fill parameter, to fill the control with the same color as the hint text when there is no value and return the fill color to white (default) when there is. To do this, set the date control's fill attribute to

If(IsBlank(Parent.Default) And IsBlank(Parent.Update), RGBA(118,118,118, 1), RGBA(255,255,255, 1)) 

 

This effectively hides the hint text if the parent data card Default value is blank, while still allowing the user to edit the control to add a value, and it doesn't require you to Unlock the default SharePoint datasource linked datacard as Padding attributes are editable.

 

Highlighted
mr-dang
Level 10

Re: Date Picker Hint Text

@SunnyJoat @tism @gokello, a fix will be coming to version 3.18113. Depending on which region you are in, it should be arriving within about 3 weeks.

Microsoft Employee
@8bitclassroom