▲ 7 r/PowerApps
So the updated modern date picker (ModernDatePicker@1.0.0) blanks out when the form displaymode changes from view to edit and vise versa.
I found a workaround to keep the modern control. Basically you need to trigger a change on the date field value right after the form displaymode gets changed. I used now() then set it back to the original value and it worked!
right after changing the form Displaymode add this code and should be applied anywhere the form displayMode change is triggered
UpdateContext({CurrentItem: Patch(CurrentItem, {dateField_InternalName:Now()})});
UpdateContext({CurrentItem: Patch(CurrentItem,{dateField_InternalName:Gallery1.Selected.datefield_displayName})});
Where
Currentitem is Gallery1.selected
CurrentItem is in the form.item
please make sure you use internal field name since the record schema get disconnected from the datasource it will not map correctly to datasource or you will have two separate columns for internal and displayname of the field and will post blank( )
u/Chemical-Roll-2064 — 17 days ago