Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Touch UI datepicker does not go beyond current year

Avatar

Level 1

I have implemented a touch ui datepicker in page properties for a template.  When I click on the datepicker the little calendar shows up and does not go to previous years.  I have tried setting minDate to be a date in the past but I still can't navigate beyond the current year.  Also the dates for the calendar not in the current month show NaN.  I don't see any relevant errors in the logs or the browser console. 

this is how i have the dialog implemented the field in question is publishedDate:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<jcr:root fileName="_cq_dialog.xml" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="nt:unstructured" jcr:title="Technical Article" mode="edit" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" sling:resourceType="cq/gui/components/authoring/dialog">

  <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container">

    <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/tabs"/>

    <items jcr:primaryType="nt:unstructured">

      <TechnicalArticle xmlns:cq="http://www.day.com/jcr/cq/1.0" cq:hideOnEdit="{Boolean}false" cq:showOnCreate="{Boolean}true" jcr:primaryType="nt:unstructured" jcr:title="Technical Article" sling:resourceType="granite/ui/components/foundation/section">

        <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>

        <items jcr:primaryType="nt:unstructured">

          <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container">

            <items jcr:primaryType="nt:unstructured">

              <author cq:hideOnEdit="{Boolean}false" cq:showOnCreate="{Boolean}true" disabled="{Boolean}false" fieldLabel="Author" jcr:primaryType="nt:unstructured" name="./author" renderReadOnly="{Boolean}true" required="{Boolean}false" sling:resourceType="granite/ui/components/foundation/form/textfield"/>

              <publishedDate cq:hideOnEdit="{Boolean}false" cq:showOnCreate="{Boolean}true" disabled="{Boolean}false" displayedFormat="MM/DD/YYYY" fieldLabel="Published Date" jcr:primaryType="nt:unstructured" minDate="0" name="./publishedDate" renderReadOnly="{Boolean}true" required="{Boolean}false" sling:resourceType="granite/ui/components/foundation/form/datepicker" storedFormat="YYYY-MM-DD[T]HH:mm:ss.000Z"/>

              <partNumber cq:hideOnEdit="{Boolean}false" cq:showOnCreate="{Boolean}true" disabled="{Boolean}false" fieldLabel="Part Number" jcr:primaryType="nt:unstructured" name="./partNumber" renderReadOnly="{Boolean}true" required="{Boolean}false" sling:resourceType="granite/ui/components/foundation/form/textfield"/>

            </items>

          </column>

        </items>

      </TechnicalArticle>

    </items>

  </content>

</jcr:root>

1293776_pastedImage_0.png

7 Replies

Avatar

Level 10

I will look at this to see if this occurs or if issue in your environment for some reason.

Also - if a Granite data type does not meet your needs - there is a simple fix. You can write a custom sling resource type for a Touch UI component dialog. See this article where we used a color picker as an example -- Scott's Digital Community: Creating a custom Experience Manager sling:resourceType for Touch UI

A custom sling resource type is just a JQuery plug-in.

Avatar

Level 2

I have pasted the same xml you have provided in my dialog and it is working as expected and I am using AEM 6.2. Which version of AEM you are using?

Avatar

Level 1

I'm using 6.1 with SP2 and Cumulative Fix Pack 8,  I also tried it on my 6.2 instance and got the same result. 

It seems to only be an issue when I select "view properties" from edit mode on the page.  If I select view properties from the site manager it works as expected.

Avatar

Level 1

You found any solution for this issue. I am also facing the same issue in my environment.

Avatar

Community Advisor

Hi,

Can you try with Coral3 type

e.g. granite/ui/components/coral/foundation/form/datepicker



Arun Patidar

Avatar

Level 1

I am using AEM 6.1 SP2 and dont have coral components.