• 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: Calendar - min date should be current day +

Calendar - min date should be current day + 10 years 8 months ago #28605

  • aztrid
  • aztrid's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi all,

I have this walking tour booking site for tourists on which they can book a walking tour of Copenhagen: newporttours.dk/

In the Contact form, I have this calendar where the inquirer can submit a date on which he wishes to book the tour.

I think the Calendar component has some problems such as

1. There is no option to have past days "greyed out" (unselectable) and
2. I can't set the min date to be e.g. "current date plus 7 days" (we need time to arrange the tour)

Does anyone have any advise as to how I can tweak the script for this component or maybe use another option?

Best,

Astrid
The administrator has disabled public write access.

Calendar - min date should be current day + 10 years 8 months ago #28606

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
Insert this code in the Min Date area of the calendar field's Additional Attributes:
//<code>
return date('m/d/Y', strtotime("7 days"));
//</code>

More information can be found in this article:
http://www.rsjoomla.com/support/documentation/view-article/833-calendar.html
My help is not official customer support. To receive your support, submit a ticket by clicking here
The administrator has disabled public write access.

Calendar - min date should be current day + 10 years 8 months ago #28607

  • aztrid
  • aztrid's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Thank you for your reply. It didn't work and it took my contact form away. I removed it and the contact form is still missing from its place in the right sidebar. I removed the calendar component from the form and the form did not come back.

I shall build another form now. I take it that the above code is obsolete or my RS!form version is.

Best regards,

Astrid
The administrator has disabled public write access.

Calendar - min date should be current day + 8 years 6 months ago #35931

The code must be:

//<code>
return date('m/d/Y', strtotime("+10 Days"));
//</code>
The administrator has disabled public write access.

Calendar - min date should be current day + 5 years 1 month ago #40002

  • gab
  • gab's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi,
I've to to use 2 calendar date pickers for a booking.
the first one is for the entry date. (today + 1day)
The second calendar is conditioned by the choosed entry date (min date)
I would limit the second picker to +10days in function of the date selected on the first date picker.
How can I do ?
Thanks !
Best regards
Last Edit: 5 years 1 month ago by gab.
The administrator has disabled public write access.

Calendar - min date should be current day + 5 years 1 month ago #40008

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

@gab - a Date Modifier is available for your Calendar or Date Time Picker elements.

Edit your first calendar > Validations > set the Date Modifier to become the minimum date of your second calendar, while also setting the Date Offset property to 10.
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.

Calendar - min date should be current day + 5 years 1 month ago #40010

  • gab
  • gab's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi,

Thanks, but this method will offset the minimum selectable date on the second calendar.

I need the opposite : limit the maximum choice on second calendar in relation to the choosed date on the first calendar

i've already set this condition on the first calendar to limit the min date to "today + 1 day" and it's working fine

//<code>
return date('m/d/Y', strtotime("+1 Days"));
//</code>
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!