Highlighted

Datepicker authored value retention from Classic UI to Touch UI

arvindk091986

02-10-2019

Hi all,

I have been seeing an issue on AEM 6.2 and couldn't find a response to the below situation.

Am working on converting the Classic UI components to Touch UI. One of the component has a datepicker and the value authored on Classic UI does render the data on Touch UI, but the dialog doesn't get populated with data that's authored on Classic UI and the same gets applied when we author on Touch dialog, the value doesn't get populated in Classic UI dialog.

For getting the Classic UI authored datepicker value in Touch UI, I tried using "format=m-d-Y" in Classic and "valueFormat=MM-DD-YYYY" in Touch. I was getting a timestamp issue here on the Touch UI datepicker, so for that I have applied "@TypeHint" followed by the name of the field and that had removed the timestamp from the value that's getting saved under jcr node. And ofcourse, the authored values are not getting populated in either of the cases - from Touch to Classic nor Classic to Touch.

Appreciate your response. Thanks in advance.

Replies

Highlighted

jbrar

Employee

02-10-2019

This issue has already been discussed at [1]. Check if that resolves the issue.

Also, Try using a Coral date picker[1] and check.

If this is still an issue, log a daycare ticket with reproducible steps.

[1]

AEM 6.1 Touch UI: Datepicker Field not prepopulated with stored value

[2] DatePicker — Granite UI 1.0 documentation

Highlighted

Ankur_Khare

MVP

02-10-2019

I would suggest to check the node order in which u are adding the date picker fields in dialog.

we faced the similar issue and the issuw was with the node added for date fields was wrong.

Yes node order matters.

Highlighted

arvindk091986

03-10-2019

JaideepBrar​ - Thanks about that. I have validated that before my forum post. The way I have written down my Classic and Touch UI fields are mentioned below. The issue is, the rollover or the populating of value when authored in Touch UI is not showing up on Classic and even when I author it on Classic and submit it, again when I reopen the Classic dialog the field doesn't get pre-populated with what's being authored a moment ago.

Classic UI:

<last_updated

disabled="false"

xtype="datefield"

jcr:primaryType="cq:Widget"

validateOnBlur="true"

selectOnFocus="false"

readOnly="false"

name="./last_updated "

fieldLabel="Last Updated"

fieldDescription="Enter a last updated date" 

allowBlank="true"

format="m-d-Y"/>

Touch UI:

<last_updated

sling:resourceType="granite/ui/components/coral/foundation/form/datepicker"

jcr:primaryType="nt:unstructured"

type="date"

name="./last_updated@TypeHint"                          (Applying TypeHint had removed the timestamp from datepicker selection)

fieldLabel="Last Updated"

fieldDescription="Enter a last updated date"

storedValue="MM-DD-YYYY"/>                     (Applying valueFormat/storedValue didn't really made any difference)

Will reach out to daycare with all the combinations of steps that I tried. Thank you.!

Highlighted

Arun_Patidar

MVP

03-10-2019

As a workaround, you can get classic UI date value in the touch UI hidden text field and then convert it in touch UI date formate and populate touch UI date field,( do only once if touch UI date field is never authored).

Highlighted

arvindk091986

04-10-2019

arunpatidar26​ - The author's have the ability to keep updating the datefield depending upon the requirement. I think, it may not work.

Highlighted

Arun_Patidar

MVP

06-10-2019

It will work If you stick with one of the editors e.g. Touch UI.

It does work, you may need to update logic when you read touch UI format value and convert into the desired value format.