• 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: How to set minimum and maximum dates in calendars?

How to set minimum and maximum dates in calendars? 12 years 1 week ago #22762

  • adil88
  • adil88's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi, I am a newbie in RSForm Pro. I need to create a calendar in my registration form with minimum and maximum dates. I need to prevent a user from selecting a date before the minimum date and after the maximum date.
There is a tutorial on this, but I am not able to follow it.
Could anyone elaborate this tutorial in simpler terms.

Thanks
The administrator has disabled public write access.

How to set minimum and maximum dates in calendars? 12 years 1 week ago #22769

  • silviup
  • silviup's Avatar
  • OFFLINE
  • Moderator
  • Posts: 309
  • Thank you received: 49
If the minimum and maximum dates are fixed, achieving this would be fairly simple, just head to Components >> RSForm!Pro >> Manage Forms >> edit your form >> Components >> edit your calendar field and add the dates in the Min Date and Max Date fields found in the 'Attributes' tab. Note that the required date format is 'mm/dd/yyyy', so the end result should look like this:

04/24/2013

If you wish to calculate the min and max dates based on the current date, you will need to add a script similar to the following one

//<code>
return date('m/d/Y', strtotime("today"));
//</code>

in the Min Date / Max Date fields.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
The following user(s) said Thank You: mikekiy, hayabusa hitsugaya

How to set minimum and maximum dates in calendars? 11 years 7 months ago #24815

  • info6667
  • info6667's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
how can you make it for next day?

so not today but do i need to fill in tomorrow?
or + 1 day somewhere

and can i change the max date so someone can only click on the next 5 days from now on?
The administrator has disabled public write access.

How to set minimum and maximum dates in calendars? 10 years 2 months ago #30494

  • fjreisat
  • fjreisat's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I'd love to know the answer to this. I'm currently trying to make the minimum date on a calendar field of mine in RS!Form. I'd like it to be 5 months from the current day.

Any help would be much appreciated.
The administrator has disabled public write access.

How to set minimum and maximum dates in calendars? 10 years 2 months ago #30508

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
More example on this topic can be found here:

https://www.rsjoomla.com/forum/37-rsform-pro/24468-calendar-min-date-should-be-current-day-.html#28606

https://www.rsjoomla.com/forum/37-rsform-pro/24021-validate-calendar-date.html#27622

and many other examples can be found using search.

The strtotime syntax is fairly easy to use, you can read more on it here:
http://php.net/manual/ro/function.strtotime.php
My help is not official customer support. To receive your support, submit a ticket by clicking here
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!