cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rlmckean
Helper IV
Helper IV

Datepicker does not update editform field

Hi

I have an app created editform which has embeded a date picker for a date column. After loading a newform and picking a date,  on submit, the record goes to the sharepoint list but the datefield is blank - Help !

Cheers

Richard

1 ACCEPTED SOLUTION

Accepted Solutions

Hi rlmckean,

 

What’s the default value have you set for the Date picker control?


How is the Update property of the Date card configured?

 

To test this issue, I create an app based on SharePoint list and there is a Date column(Date only) in the list.


On the auto-generated app based on this list, on EditScreen, I set the Default property of the Date picker control as today().


And the Update property of the Date card is configured as DataCardValue3.SelectedDate.


When I create a new record, no matter I use the default date or select another date, it can be saved to data source.

3.PNG

 


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
rlmckean
Helper IV
Helper IV

Just rechecked this - If the date picker selects a date, the column is updated, but if the date is left at the default date, it does not. I checked this by using a text box set to datepicker.updates.datefield on the form

Needs a solution please !

Cheers

Richard

Hi rlmckean,

 

What’s the default value have you set for the Date picker control?


How is the Update property of the Date card configured?

 

To test this issue, I create an app based on SharePoint list and there is a Date column(Date only) in the list.


On the auto-generated app based on this list, on EditScreen, I set the Default property of the Date picker control as today().


And the Update property of the Date card is configured as DataCardValue3.SelectedDate.


When I create a new record, no matter I use the default date or select another date, it can be saved to data source.

3.PNG

 


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi MAbel

sorry for wasting your time !! - It was the default value that was incorrectly set. 

MAny thanks - your great help has got me near to the end of this particular marathon !!

Did you by any chance notice my message regarding a many to many solution yesterday ??

 

MAny thanks

 

Richard

Good Morninf @v-yamao-msft

 

Could you please let me know my datepicker is not working? I've follow your instuctions but I can't figure out.

 

Thanks in advance

 

Capture.JPG

heres2u
Frequent Visitor

I know that if you create an inventory app from a list which has a date... the edit form date-picker field will have a default setting (under: Advanced > InputTextPlaceholder) such as:

  
If(IsBlank(Self.SelectedDate), Text(Date(2001,12,31), Self.Format, Self.Language))

With that code, if you want to edit an existing date, the edit form will display the default date (12/31/2001).   So what I do is edit the update form field for date-picker (under: Advanced > InputTextPlaceholder) to be:

 

If(IsBlank(Self.SelectedDate), Text(Date(2001,12,31), Self.Format, Self.Language),(Parent.Default))

Note : I add ",(Parent.Default)" before the closing parenthesis.   

In natural language that would read something like: "If the date field is blank in the sharepoint list, display the default text of 12/21/2001 for the date-picker field,  else if there is data in the sharepoint list for the date field, display that date instead.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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