• 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 Sundays in new Date & Time picker

Block Sundays in new Date & Time picker 9 years 2 months ago #34239

  • jan007
  • jan007's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
I need to block Sundays in the Date & Time picker (new field since version 1.51.0). Is this possible?

The Java script below, which I use for the calender, is not working...

<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() == 7) {
alert('Sorry, we are closed on Sunday...');
} else {
return true;
}
}
</script>
Last Edit: 9 years 2 months ago by jan007.
The administrator has disabled public write access.

Block Sundays in new Date & Time picker 9 years 1 month ago #34571

jan007...... Instead of your code:
if (d.getDay() == 0 || d.getDay() == 7) {
alert('Sorry, we are closed on Sunday...');
} else {
return true;

try this:
if (d.getDay() == 0 ) {
alert('Sorry, we are closed on Sunday...');
return false;
} else {
return true;

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