• 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: Problem with calendar and JavaScript

Problem with calendar and JavaScript 11 years 10 months ago #24021

  • Picht
  • Picht's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hi

I have a form with 2 date fields.

What i want to achieve is that when i choose a date in the first calendar, then the date gets passed to the field for the second calendar AND as the selected date for the second calendar.

For now this code is entered and it takes care of the first part (setting the selected date in calendar 1 in the second calendar textfield:
<script type="text/javascript">
function rsfp_onSelectDate(selectedDate, type, args, calendar)
{
   if (calendar == 'Calendar cal3_0')
   {
   document.getElementById('txtcal3_1').value = selectedDate;
   }
   return true;
}
</script>

For the second part (setting the selected date in the second calendar i have tried this:
<script type="text/javascript">
function rsfp_onSelectDate(selectedDate, type, args, calendar)
{
   if (calendar == 'Calendar cal3_0')
   {
   document.getElementById('txtcal3_1').value = selectedDate;
   RSFormProCalendars[1]['UdlejningSlutDato'].select(selectedDate);
   }
   return true;
}
</script>

But now the code does not work at all. The selected date from calendar 1 is not even put in the textbox 1.

The formID is 1 and the second calendar is named "UdlejningSlutDato"

Can anyone help ?

Thanks
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!