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

AEM 6.4- on click of a checkbox hide time field in a datetime widget within a dialog

NitroHazeDev
Level 8
Level 8

All,

 

Is there a way to hide the time portion of the date time popover conditionally? Please let me know if someone has accomplished this 

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor
3 Replies
NitroHazeDev
Level 8
Level 8

Managed to find solution, unsure if this is ok.. wanted a better way vs just  button[is="coral-button"] on click

 $('button[is="coral-button"]').on('click', function() {

//check for condition 

 $('.coral3-Datepicker-clockContainer')[0].hidden =true;

});

Arun_Patidar
Correct answer by
Community Advisor
Community Advisor
NitroHazeDev
Level 8
Level 8

Thanks @Arun_Patidar . Below also worked. It is just that it does a click on entire field vs just the icon for calendar.

If i may ask do you have any inputs on https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-4-update-a-datetime-... ?

 

 $('coral-datepicker[type="datetime"]').on('click', function() {

});