• 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: Restricting date picker to first sunday

Restricting date picker to first sunday 5 months 1 day ago #43118

I have a puzzle for anyone…

I need the date picker to restrict dates after the first full weekend of the month,

e.g. If you look at this page
fop12.onefaith.ie/baptism/baptism-request/baptism-blackpool
1st Sunday of the month and choose Sep 2024 the first Sunday after the first full weekend should be Sunday 8th. (not the 1st)

Code for Allowed dates is currently:

//<code>
$dateTime = new DateTime();
$dateEnd = new DateTime("+2 year");
$dates = '';
while ($dateTime < $dateEnd) {
$dates .= date('m/d/Y', strtotime('first sunday of '.$dateTime->format('F Y'))) . "\n";
$dateTime->modify('+1 month');
};
return $dates;
//</code>

And on fop12.onefaith.ie/baptism/baptism-request/baptism-the-cathedral
(2nd and 3rd Sunday) in Sep 2024 after the first full weekend should be 15th and 22nd (not 8th and 15th)

Code for Allowed dates is currently:
//<code>
$dateTime = new DateTime();
$dateEnd = new DateTime("+2 year");
$dates = '';
while ($dateTime < $dateEnd) {
$dates .= date('m/d/Y', strtotime('second sunday of '.$dateTime->format('F Y'))) . "\n";
$dates .= date('m/d/Y', strtotime('third sunday of '.$dateTime->format('F Y'))) . "\n";
$dateTime->modify('+1 month');
};
return $dates;
//</code>
Last Edit: 5 months 1 day ago by denis.r.oregan.
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!