• 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: Block weekends from calendar

Block weekends from calendar 10 years 11 months ago #27554

I'm trying to work out how to block weekends from the calendar pop-up. I've managed to block out all previous days from tomorrows date but cannot see how to block weekends.
Help would be much appreciated!
The administrator has disabled public write access.

Block weekends from calendar 10 years 11 months ago #27559

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
<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>

Insert this code in the CSS and Javascript tab.This will block saturdays and sundays from your calendar, for more information read the official RSJoomla! article and on the same topic another example
My help is not official customer support. To receive your support, submit a ticket by clicking here
Last Edit: 10 years 11 months ago by cosmin.cristea.
The administrator has disabled public write access.

Block weekends from calendar 10 years 11 months ago #27613

Perfect, thanks!
The administrator has disabled public write access.

Block weekends from calendar 10 years 1 month ago #30785

  • filippo.bracci
  • filippo.bracci's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 1
Hello,

I have to do the same work but I need to disable only one day of the calendar: Saturday.

How is it possible?

Thanks!

Filippo
The administrator has disabled public write access.

Block weekends from calendar 10 years 1 month ago #30793

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
You simply remove the condition for the 6'th day.

E.g.
if (d.getDay() == 0) {
My help is not official customer support. To receive your support, submit a ticket by clicking 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!