Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

A Datetime Picker should be closed when another one is opened, instead multiple instances of Datetime Picker remain open at the same time! Pics included

(0) ShareShare
ReportReport
Posted on by 520

I have 2 Datetime pickers

Robert94_0-1662125944596.png

The normal behaviour expected would be, when one datetime picker is opened, and we open another one, the first one will close,

instead if we click on both buttons, both datetime picker will remain opened,

Robert94_1-1662125996691.png

I would want to behave, when clicking a datetime picker, similar to when clicking o the background, which means to close the other datetime picker that is opened.

Categories:
  • H V Profile Picture
    1,510 on at
    Re: A Datetime Picker should be closed when another one is opened, instead multiple instances of Datetime Picker remain open at the same time! Pics included

    Hi @Robert94 

     

    You need to replace scheduledstart with your first field logical name and scheduledend with your second field logical name.

     

    --------------------------
    If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

  • Robert94 Profile Picture
    520 on at
    Re: A Datetime Picker should be closed when another one is opened, instead multiple instances of Datetime Picker remain open at the same time! Pics included

    Hi @hardikv , I appreciate your response, unfortunately, I couldn`t make it work, I also tried with the inspect console, and it is still not working? Is it something I have to modify to the code for my case? Did it work for you?

    I`ve pasted it in the custom JS of Webpage, and then in the custom JS of the Basic Form.

  • H V Profile Picture
    1,510 on at
    Re: A Datetime Picker should be closed when another one is opened, instead multiple instances of Datetime Picker remain open at the same time! Pics included

    Hi @Robert94 

     

    Please use below code:

    $(document).ready(function(){
    	$("#scheduledstart").closest("div").find(".input-group-addon").click(function(){
    		$('#scheduledend').next().data("DateTimePicker").hide()
    	});
    
    	$("#scheduledend").closest("div").find(".input-group-addon").click(function(){
    		$('#scheduledstart').next().data("DateTimePicker").hide()
    	});
    });

     

    --------------------------
    If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >