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

DatePicker value is cleared on form view/edit

Hi all,

 

I have stumbled upon an issue that I can't solve... 

 

After submitting a new item via Form, the value entered in Date Picker (including hour + min) is cleared when I later want to View or Edit the item.

 

I have set DefaultDate (Date part) and Default (Hour / min parts) to value "parent.Default" - but no luck. The form just wont retain the value no matter what I do.

 

Worth mentioning is that I do not want a default date to be entered if the user do not choose a date - then it should be left empty.

 

Cheers,

Daniel

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @m00080999 ,

 

You could set the Data Picker's OnChange property to:

Set(VarDateTime,Self.SelectedDate)

And then set the Data Picker's DefaultDate property to:

IsBlank(
  parent.Default,
  VarDateTime,
  parent.Default
)

 

Best Regards,

Bof

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @m00080999 ,

 

You could set the Data Picker's OnChange property to:

Set(VarDateTime,Self.SelectedDate)

And then set the Data Picker's DefaultDate property to:

IsBlank(
  parent.Default,
  VarDateTime,
  parent.Default
)

 

Best Regards,

Bof

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,804)