• 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: Calender with only one weekday available

Calender with only one weekday available 6 months 4 weeks ago #43665

Hi
I'm trying to make a dropdown where you choose a weekday.
When you choose a day, a calendar appears where you can only select dates that have the chosen weekdays.

I tried it with a couple scripts i found on the forum and ChatGPT, but I can't get it to work.

How can I achieve this?
The administrator has disabled public write access.

Calender with only one weekday available 5 months 3 weeks ago #43710

  • dragos
  • dragos's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 630
  • Thank you received: 114
Hello,

You can try to create one Date and Time Picker for each dropdown weekday. For example, if you have 3 days in the dropdown field (let's name it 'dropdownDays'):
Monday
Tuesday
Wednesday

..you'll create 3 Date / Time Picker fields, let's name them:
dayMonday
dayTuesday
dayWednesday

Edit these fields by turn, go to Attributes tab and you'll notice the following section:

- Disabled Weekdays (0-6) - The weekdays specified here will be disabled. Add one value per line (eg. adding 0 will disable the first day of the week).

In the 'dayMonday' field > Disabled Weekdays, you'll add:
0
2
3
4
5
6

Notice 1 is not in the list, thus, all the above days, except for 1 (which is Monday), are disabled.

In the 'dayTuesday' field > Disabled Weekdays, you'll add:
0
1
3
4
5
6

In the 'dayWednesday' field > Disabled Weekdays, you'll add:
0
1
2
4
5
6

You can set the 'Display Timepicker' to 'No' if you don't want to display the time in the field. More on the Date and Time Picker field here.

Now, while editing your form, go to Form Properties > Conditional Fields and create one condition for each dropdown selection, for example:
Show / dayMonday / if / all / dropdownDays / is / Monday
Show / dayTuesday / if / all / dropdownDays / is / Tuesday
Show / dayWednesday / if / all / dropdownDays / is / Wednesday
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!