• 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 - MINDATE > today?

Calendar - MINDATE > today? 14 years 2 days ago #13547

  • psp
  • psp's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello!

I use the Calendar in table-layout and I'd like to automatically set the MINDATE value to a day X days in the future. Or if this is not doable, at least on today. So that it's not possible to send a form with a date in the past!

How can I achieve this? - without daily updating MINDATE by myself :blink: ;)

Thanks in advance for help and advice. :)

O'Brian
The administrator has disabled public write access.

Re:Calendar - MINDATE > today? 13 years 11 months ago #13646

  • david.bowen
  • david.bowen's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
I've just raised a support ticket on this same question. I need the minimum date to be today plus 7 days.

I'll post here when I get a reply.
The administrator has disabled public write access.

Re:Calendar - MINDATE > today? 13 years 11 months ago #13658

  • david.bowen
  • david.bowen's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
As promised, here's the script & it works.

In order to achieve this please try setting the minimum date of your calendar field to "01/18/2011" and the "Date format" to "dd.mm.yyyy". After you have done this please go to the "Scripts" tab and add the following script in the "Scripts called on form display" field:

$Sdate = time() + (7 * 24 * 60 * 60);
// 7 days; 24 hours; 60 mins; 60secs
$tmp = date('m/d/Y',$Sdate);
$formLayout = str_replace("{'mindate': '01/18/2011'}", "{'mindate': '".$tmp."'}", $formLayout);
The administrator has disabled public write access.
The following user(s) said Thank You: gabriel5

Re:Calendar - MINDATE > today? 12 years 8 months ago #18513

  • gabriel5
  • gabriel5's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Do you know how to do this but only with weekdays (no Saturdays or Sundays), I mean that the MINDATE value to a day X weekdays days in the future?
The administrator has disabled public write access.

Re:Calendar - MINDATE > today? 12 years 6 months ago #19483

Wondering if you solved this.
Dealing with simualar situation.
The administrator has disabled public write access.

Re: Calendar - MINDATE > today? 12 years 6 months ago #19493

  • gavindcht
  • gavindcht's Avatar
  • OFFLINE
  • Banned
  • Posts: 63
  • Thank you received: 1
+1. Would be nice to get an update on this.
Deleted code is debugged code.
The administrator has disabled public write access.

Re:Calendar - MINDATE > today? 11 years 7 months ago #24818

  • info6667
  • info6667's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
already had an awnser on this? because i need also sundays and saturdays disabled ..... but don´t know how
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!