• 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: Timepicker times

Timepicker times 6 years 11 months ago #36811

  • xingu
  • xingu's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 32
  • Thank you received: 1
Hello, I need help to figure out how to remove the unavailable times in the timepicker. The example page has a solution but I cannot seem to understand how to incorporate it with my form.
allowTimes options TimePicker Example #
xdsoft.net/jqplugins/datetimepicker/

The example is:

jQuery('#datetimepicker5').datetimepicker({
datepicker:false,
allowTimes:[
'12:00', '13:00', '15:00',
'17:00', '17:05', '17:20', '19:00', '20:00'
]
});

I entered this but it does not work.

<script type="text/javascript">
jQuery(document).ready(function(){
myDateTPicker = RSFormPro.jQueryCalendar.calendars[6];
datepicker:false,
allowTimes:[
'12:00', '13:00', '15:00',
'17:00', '17:05', '17:20', '19:00', '20:00'
]
});
</script>

Can you please help me fix it?

Thank you
Last Edit: 6 years 11 months ago by xingu. Reason: code disappeared
The administrator has disabled public write access.

Timepicker times 6 years 11 months ago #36815

  • dragos
  • dragos's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 557
  • Thank you received: 102
Hello,

If you wish to disable the date picker and choose only these hours, you should try using the following code instead:
<script type="text/javascript">
jQuery(document).ready(function(){
  myDateTPicker = RSFormPro.jQueryCalendar.calendars[17]['dtp'];
  //replace 17 with your form ID and the date time picker name.
  myDateTPicker.calendarInstance.setOptions({
    datepicker:false,
    timepicker:true,
    allowTimes:['12:00', '13:00', '15:00','17:00', '17:05', '17:20', '19:00', '20:00'],
  });
});
</script>

Make sure you replace [17] with your form ID and with the actual name of your Date and Time Picker field.

Various examples on how to control this type of field can be found here:

www.rsjoomla.com/support/documentation/r...and-time-picker.html
The administrator has disabled public write access.
The following user(s) said Thank You: xingu

Timepicker times 6 years 11 months ago #36817

  • xingu
  • xingu's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 32
  • Thank you received: 1
Thanks this worked great. I needed the date picker so I just deleted the datepicker:false line.
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!