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

SOLVED

how to configure datefield xtype in dialog to just show list of years for selection instead of m/d/Y in aem.

Avatar

Level 2

how to configure datefield xtype in dialog to just show list of years for selection instead of m/d/Y in aem.

Cap1.PNG

I tried to configure it using the format property, and was able to just get the year when i select any date from datefield.

Cap2.PNG

Is there a way to just show the years.

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi krupesh,

Either you have to write custome xtype by using the widget api CQ5 | Widgets API .

Otherwise I think you need only year instead of datefield use select to select the years from the select box and select box take the value dynamically for this you have to write the jsp code to get the year and put in json formet and used in select box take a look of this example:

Dynamic Dialog Data with JSON in CQ5 - Jenikya's Blog

Dynamic options using Javascript in Adobe AEM Dialog | myprogressivelearning

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

Hi krupesh,

Either you have to write custome xtype by using the widget api CQ5 | Widgets API .

Otherwise I think you need only year instead of datefield use select to select the years from the select box and select box take the value dynamically for this you have to write the jsp code to get the year and put in json formet and used in select box take a look of this example:

Dynamic Dialog Data with JSON in CQ5 - Jenikya's Blog

Dynamic options using Javascript in Adobe AEM Dialog | myprogressivelearning