Ackk! I finally transposed an earlier custom function I had written for some other code, so that now the dates object can include entries based upon the nth day in a month! Like:
Code:
<script>
jQuery(function($){
var calert = $.prototype.calendar('calert'), mydates = {
"5,25" : {title: "My Birthday!", click: calert, content: "Happy Birthday John!"},
"10,8" : {title: "Lois's Birthday!", click: calert, content: "Happy Birthday Lois!"},
"11,4Thu": {title: "Thanksgiving, USA", classes: "harvest", click: calert, content: "Happy Thanksgiving!"}
}, dt = new Date();
dt.setDate(15); dt.setMonth(dt.getMonth() - 1);
$('#now').calendar({date: dt, dates: mydates, showYear: true, controls: 'before'});
$('#may').calendar({date: new Date(2016, 4, 25), dates: mydates, controls: true});
});
</script>
To, for example select the 4rth Thursday in any given November. The beauty part for me though is that the Thu
part is based upon the configured day names, so it should be language transposable/intuitive.
Demo (same as last, may need to be refreshed/cache cleared - you know the drill
):
http://jscheuer1.com/demos/tidbits/time/
Bookmarks