• 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 set up (+2 days from today's date)

calender set up (+2 days from today's date) 11 years 4 months ago #25951

www.rsjoomla.com/support/documentation/v...-calendar-field.html

I red this page. and i wrote that in php script field. but it doesnt work.
I dont understand PHP well, so please somebody help me... :pinch:


I have 2 calender.


1. pickup_date ← form Name

+2 days from today's date


2. deli_date ← form Name

+16 days from today's date
The administrator has disabled public write access.

calender set up (+2 days from today's date) 11 years 4 months ago #25953

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

You can try using the following snippet within the "Min Date" area of your calendar (backend > Components > RSForm!Pro > Manage Forms > your form > edit the calendar component > Attributes tab):
//<code>
$currentdate = date('m/d/Y');
return date('m/d/Y', strtotime($currentdate. ' + 2 days'));
//</code>

This will only allow date selections which are 2 days from now. In case you want the date of the calendar field to be pre-filled at exactly 2 days from today, you can add the above code within the Default Value area of the calendar field.

The same code can be used for your second calendar field, but you will have to replace 2 with 16.
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.
The following user(s) said Thank You: sales05, will.rosner, francebed.h, ckamp

calender set up (+2 days from today's date) 11 years 4 months ago #25966

i can set date.
thank you very much !!!!!!!
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!