• 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: Use disabledDates and specific day in one script

Use disabledDates and specific day in one script 3 years 6 months ago #40630

  • yolknet
  • yolknet's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
In the code below I'm trying to combine a weekly day with specific dates. Both options work separately from each other, but how can I use them both in one script?
disabledDates = ['10/10/2020','11/10/2020','10/11/2020'];
 
myDateTPicker = RSFormPro.jQueryCalendar.calendars[5]['datumtijd'];
 
myDateTPicker.callbackSelectedDateTime = function(selectedDateObject, calendarInstance, calendarDateObject, input, inputFormat)
{
	weekDay = calendarDateObject.getDay();
 
	if (weekDay == 1) {
		alert('We are closed!');
		return false;
	}
}
 
myDateTPicker.calendarInstance.setOptions({
	dayOfWeekStart: 1,
 
	disabledDates: disabledDates
});
The administrator has disabled public write access.

Use disabledDates and specific day in one script 3 years 6 months ago #40667

  • booija
  • booija's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
The administrator has disabled public write access.

Use disabledDates and specific day in one script 3 years 4 months ago #40824

  • jamesk9
  • jamesk9's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
Hey,

Had hetzelfde, de volgorde is belangrijk:

Probeer dit eens:
<script type="text/javascript">
jQuery(document).ready(function() {
 
// Datum is mm/dd/yyyy
var disabledDates = ['12/30/2020','11/10/2020','10/11/2020'];
 
myDateTPicker = RSFormPro.jQueryCalendar.calendars[5]['datumtijd'];
 
myDateTPicker.calendarInstance.setOptions({
	//i.p.v. een "we are closed" popup, diable the day
	//disabledWeekDays: [1],
	dayOfWeekStart: 1,
	disabledDates: disabledDates
});
 
myDateTPicker.callbackSelectedDateTime = function(selectedDateObject, calendarInstance, calendarDateObject, input, inputFormat)
{
	weekDay = calendarDateObject.getDay();
 
	if (weekDay == 1) {
		alert('We are closed!');
		return false;
	}
}
});
</script>

Een tip, ipv een pop "we are closed", je kan ook de Maandag verwijderen als in klikbare optie. Ik heb dat als een comment ingevoegd.
The administrator has disabled public write access.

Use disabledDates and specific day in one script 3 years 4 months ago #40825

  • booija
  • booija's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
Ik heb het intussen heel anders opgelost.
Ik heb een array gemaakt die doorlopen wordt die gekoppeld is aan een extra veld van een artikel.
Op deze manier krijg ik de datums en worden deze alleen actief in de agenda.
Dit in een loop van 3 maand.

Maar dank voor uw reactie.
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!