• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How to open calendar 2 on minimum date position ?

How to open calendar 2 on minimum date position ? 11 years 5 months ago #25759

Since rev46 we can set a selected date of calendar 1 to minimum date of calendar 2, but we have to go manually to this date on cal2. It will be fine when you click on cal2 that it open on the place of the selected minimum date.
It's certainly easy to write a little JS code to get this right... But I can't, my knowledge in scripting is too limited.
Should someone can do this in the RSForm pro community?

Thanks if you could help
The administrator has disabled public write access.

How to open calendar 2 on minimum date position ? 11 years 5 months ago #25768

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

The following article provides an example on how you can control the calendar:

www.rsjoomla.com/support/documentation/v...ng-the-calendar.html

From what I understand, you want to add the date selected from the first calendar to the second one. If this is the case, you can use a similar JavaScript code like the one that follows within the RSForm!Pro JavaScript area(backend > Components > RSForm!Pro > Manage Forms > your form > Properties > CSS and JavaScript > JavaScript area):
<script type="text/javascript">
function rsfp_onSelectDate(selectedDate){
 
document.getElementById('txtcal1_1').value = selectedDate;
 
return true;
}
</script>

For the script above to work properly you will have to replace the txtcal1_1 with the exact ID of the input box from the second calendar(found by inspecting the source code of the page).
This is not official customer support. To receive your support, submit a support ticket here.
Last Edit: 11 years 5 months ago by adrianp.
The administrator has disabled public write access.

How to open calendar 2 on minimum date position ? 11 years 5 months ago #25770

Thanks Adrian for helping.

I just insert the code, change it with the right Id, but now both the fields remains empty.
Last Edit: 11 years 5 months ago by vincentprat64.
The administrator has disabled public write access.

How to open calendar 2 on minimum date position ? 11 years 5 months ago #25779

It seems it's not so easy to improve a new function in the code : I red the cal.js page and with more than 6000 lines, have little problem to bring it to work.

Can somebody tell me why it's not possible to open cal-2 when clicked at the chosen modified date of cal-1 ?

Thanks in avance for helping so far.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!