• 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: Disable specific days in RSform

Disable specific days in RSform 3 years 10 months ago #41336

  • info260
  • info260's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello,
We are using RS form to make a reservation form
On that form we would like to disable Monday and tuesday
When looking in your forum we found the following code to disable weekends
I've tried using it and changing the selected days but nothing happens
<script type="text/javascript">
  function rsfp_onSelectDate(date, type, args, calendar)
{
var dates = args[0];
var date = dates[0];
var year = date[0], month = date[1], day = date[2];
 
var d = new Date(year, month-1, day);
if (d.getDay() == 0 || d.getDay() == 6) {
alert('Available only from Monday to Friday');
return false;
} else {
return true;
}
}
</script>

This was in a forum post of 7 years ago and does not seem to work anymore

Is there still any way to do it in RSform now?
We would like to make monday and tuesday disabled in the popup date picker
The administrator has disabled public write access.

Disable specific days in RSform 3 years 10 months ago #41340

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

If you're referring to the "Date & Time Picker" form element (otherwise you can consider using it instead), you can find plenty examples including how to disable certain weekdays here.
This is not official customer support. To receive your support, submit a support ticket here.
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!