cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
loganpd
Frequent Visitor

How to connect a date picker to a field?

I can't figure out how to get the value in a date field to save in a form. I understand how to edit a data card and replace a standard text box with a data card, but I cannot get the date to save. I'm sure it's a simple fix, but I can't figure it out.

 

Attached are pictures of the date picker and the advanced options screen associated with the data card.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
timl
Super User
Super User

Hi @loganpd

 

The first problem I can see is that .text isn't a valid property of a date picker control. Therefore, I'd suggest changing the Update property of DataCard1 to DatePicker7.SelectedDate

 

I'd also clear the AllowedValues property of DataCard1 to see if that clears the second warning. Otherwise, hover the mouse over the exclamation point icon and post the error message here. Hope that helps.

View solution in original post

In general, a data card contains a data input control, a field label, and possibly a label that displays validation errors. Assuming that you deleted the text input control that was originally on the card, the other labels on the card may still refer to the original text input control (for example, the Y co-ordinate property of the error message label). If you click the 'invalid name' exclamation icon, it should display the formula where the error occurs. You can then replace the name of the original text input control with the name of your date picker control.

View solution in original post

4 REPLIES 4
timl
Super User
Super User

Hi @loganpd

 

The first problem I can see is that .text isn't a valid property of a date picker control. Therefore, I'd suggest changing the Update property of DataCard1 to DatePicker7.SelectedDate

 

I'd also clear the AllowedValues property of DataCard1 to see if that clears the second warning. Otherwise, hover the mouse over the exclamation point icon and post the error message here. Hope that helps.

loganpd
Frequent Visitor

Your first suggestion worked. Thank you!! I still have one of the error messages. It doesn't seem to affect saving the date. See the attached picture. It says "invalid name".

 

I cleared the allowed values box as well.

In general, a data card contains a data input control, a field label, and possibly a label that displays validation errors. Assuming that you deleted the text input control that was originally on the card, the other labels on the card may still refer to the original text input control (for example, the Y co-ordinate property of the error message label). If you click the 'invalid name' exclamation icon, it should display the formula where the error occurs. You can then replace the name of the original text input control with the name of your date picker control.

loganpd
Frequent Visitor

Thank you @timl. That worked just as you described.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,873)