• 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: Allow specific dates to choose from in date picker

Allow specific dates to choose from in date picker 2 years 6 months ago #42308

I have a form with following Javascript.
I want to ALLOW specific dates, although these dates could be disabled following this code.
Can I get some script to override and enable a specific Monday (for orders for Christmas, Newyear) for example?

<script type="text/javascript">
jQuery(document).ready(function(){
myDateTPicker = RSFormPro.jQueryCalendar.calendars[3];
myDateTPicker.callbackSelectedDateTime = function(selectedDateObject, calendarInstance, calendarDateObject, input, inputFormat) {
weekDay = calendarDateObject.getDay();
if(weekDay == 0 || weekDay == 1 || weekDay == 2 || weekDay == 5 || weekDay == 6){
//0 = Sunday, 1 = Monday and so on...
alert('Gelieve een woensdag of donderdag, vanaf volgende week, te selecteren.');
return false;
}
}
});
</script>


//Start of the week (day)
<script type="text/javascript">
jQuery(document).ready(function(){
myDateTPicker = RSFormPro.jQueryCalendar.calendars[3];
myDateTPicker.calendarInstance.setOptions({
dayOfWeekStart: 1
//0 = Sunday, 1 = Monday and so on...
});
});
</script>

//disable weekdays other than Thursday, Wednesday
<script>
jQuery(function() {
RSFormPro.jQueryCalendar.calendars[03].calendar.datetimepicker({disabledWeekDays:[0,1,2,5,6]});
});
</script>

//disable special dates (mm/dd/yyyy)
<script type="text/javascript">
jQuery(document).ready(function(){
var myDisabledDates = ;
//the dates you want to disable
myDateTPicker = RSFormPro.jQueryCalendar.calendars[03];
//replace 25 with your form ID and the date time picker name.
myDateTPicker.calendarInstance.setOptions({
disabledDates: myDisabledDates
});
});
</script>
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!