AEM 6.4- on click of a checkbox hide time field in a datetime widget within a dialog | Community
Skip to main content
Level 9
December 28, 2021
Solved

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

  • December 28, 2021
  • 2 replies
  • 955 views

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 

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

2 replies

Level 9
December 28, 2021

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;

});

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
December 29, 2021
Level 9
December 30, 2021

Thanks @arunpatidar . 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-field-changing-the-valueformat-and/m-p/435711#M124356 ?

 

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

});