Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Date Field not preserving the previously authored date when author reopens the component dialog

Avatar

Level 1

We have used a Date Field in one of our component's dialog. When author selects a date and save the changes, it gets saved in jcr but whenever authors reopens the component dialog it doesn't displays the previously authored date. Tried inside multifield as well and found same behavior.

AEM version - 6.1

6 Replies

Avatar

Employee

- Can you clarify if you are using Coral UI components ?

- Do you have any nested multifield  ?

Avatar

Level 1

We are using granite/ui/components/foundation/form/datepicker

​Yes we are using it inside nested multifield.

Avatar

Level 2

Do you have a component specific client libs written out for the date field? Can you upload a screenshot of the properties so we can take a look at how the date value is stored? As a property or as a node?

Avatar

Level 1

No we don't have any specific clientlibs written out for date field. PFB the SS of the node properties.

1781067_pastedImage_0.png

Avatar

Level 4

Date types are stored fine when the dialog re-opens. I know this document is not listed in the Experience League under the API category for some reason - but it shows you how to work with dates in dialogs:

Building Experience Manager Components using Granite/Coral Resource Types

Avatar

Employee

There are some OOTB components in AEM 6.1 that has a datefield widget in the Geometrixx site. I would recommend reviewing them to see how to configure the widget.

Also, I would disable any overlay code to ensure that these are not interfering with the way the datefield widget function.