I have 2 Datetime pickers
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,
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.
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!
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.
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!