Datepicker authored value retention from Classic UI to Touch UI | Community
Skip to main content
arvindk091986
Level 2
October 2, 2019

Datepicker authored value retention from Classic UI to Touch UI

  • October 2, 2019
  • 3 replies
  • 5689 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Adobe Employee
October 2, 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

arvindk091986
Level 2
October 3, 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.!

arunpatidar
Community Advisor
Community Advisor
October 6, 2019

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


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.

Arun Patidar
Ankur_Khare
Community Advisor
Community Advisor
October 2, 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.

Adobe Employee
October 3, 2019

Yes, logging a daycare ticket is probably the best way forward.