JDate plugin 'Allow date function option' option...

thellie

Member
Hi,
In the original Date plugin the is an Advanced tab, which gives the option to add some Javascript code. This isn't available in the jDate plugin, so how/where would I go about putting the code instead?

Cheesegrits very kindly wrote this code for me, which only allows users to choose the 1st or 3rd Monday in a calendar month. It's very hand, so I would love to retain in my new J!4 site.

I know the obvious answer is use the date plugin, but all my date elements are jDate.

btw, Is Cheesegrits still around? How's he doing?
 
Last edited:
I'm probably overlooking the obvious but I see javascript fields on date and jdate on J4. Can you post a screenshot of what you are missing and what you are trying to achieve.
 
The date element's Advance data tab (Allow date/ php allow date etc.) never made it into jdate.
So you have to stick to the date element or write your own JS code in the general element JS part.
 
I'm probably overlooking the obvious but I see javascript fields on date and jdate on J4. Can you post a screenshot of what you are missing and what you are trying to achieve.

I tried adding the code into the Javascript section before I posted, but it disappeared each time I saved the element. It's now saving correctly (weirdly, as I haven't changed anything since posting the original question, because I went to bed).

There remains a problem though - in the J!4 form all dates are still selectable, whereas in the original J!3 version only the first and third Monday of each month can be chosen. See screenshots.

So, in short, since posting at first, the code now saves in the Javascript tab. But it doesn't do what it's meant to - allow only certain dates to be selected.

J!4
Screenshot 2023-06-12 at 04.34.57.png


J!3
Screenshot 2023-06-12 at 04.39.12.png
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top