• 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: Need to filter out dates in calandar

Need to filter out dates in calandar 9 years 10 months ago #31357

  • jawadakr
  • jawadakr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hi there

is their any way to disable few dates from the date picker field by default in rs form ?

i have to make a form with booking option and have to disable few dates like 4th july.

thanks
The administrator has disabled public write access.

Need to filter out dates in calandar 9 years 10 months ago #31371

  • bogdan.tataru
  • bogdan.tataru's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 174
  • Thank you received: 40
You can easily achieve this by going to your admin panel Components > RSForm!Pro > Manage forms > select your form > Properties > CSS&Javascript and adding the following script in the Javascript field:

<script type="text/javascript">
function rsfp_onSelectDate(selectedDate)
{
if((selectedDate == "09.06.2015")||(selectedDate == "04.07.2015"))
{
alert("Disabled!");
return false;
}
else return true;
}
</script>

Note that you will need to change the dates and also change/remove the popup message.

More on this here:

www.rsjoomla.com/support/documentation/v...ng-the-calendar.html
My help is not official customer support. To receive assistance, submit a ticket by clicking here
The administrator has disabled public write access.

Need to filter out dates in calandar 7 years 5 months ago #37575

  • info4683
  • info4683's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hello Bogdan,
this script does not work for me anymore. In former versions it worked, but now not.
Has any RSForm or Joomla Update made this script unusable?

Brest regards
Martin
Kaum macht man etwas richtig, schon klappt´s..
The administrator has disabled public write access.

Need to filter out dates in calandar 7 years 5 months ago #37577

  • info4683
  • info4683's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Ok, I found the problem:

This does NOT work:
if((selectedDate == "09.06.2015")||(selectedDate == "04.07.2015"))

This works:
if((selectedDate == "09.06.15")||(selectedDate == "04.07.15"))

Best regards
Martin
Kaum macht man etwas richtig, schon klappt´s..
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!