Plugin Author
RLDD
(@rermis)
Hi Taz, thank you for your suggestion. Currently this is not a supported feature. Due to the specificity of this request and likelihood that other would not widely use a feature like this, I doubt we would consider adding it to future versions.
However, if you have a developer it is possible to add some custom code gray out the days that should not be used, with some custom CSS or javascript on pageload. Let me know if you need assistance. I am always happy to provide some direction.
Thread Starter
taz1
(@taz1)
Hi Rhett,
Thank you for your quick reply. Would you be so kind to provide me with us assistance here as I have no idea where to start.
Any help would be appreciated.
many thanks,
Taz.
Plugin Author
RLDD
(@rermis)
Hi Taz,
Let me see if I can give you a place to start with some code you can expand on. I might need a few more days to complete.
Thanks for your patience!
Plugin Author
RLDD
(@rermis)
Hi Taz,
Hopefully this will get you started. Paste this below the shortcode, and it will affect the timecard generated by the shortcode.
This allows only Mondays, but it could be changed to Tuesdays very easily…
<style>.dyt_day{opacity:.5;pointer-events:none}</style>
<script type='text/javascript'>
function allow_Mon() {
var dyt_days=document.getElementsByClassName('dyt_day');
for(var i = 0; i < dyt_days.length; i++) {
if(dyt_days[i].innerHTML.includes('Mon')>0) {
dyt_days[i].style.opacity='1';
dyt_days[i].style.pointerEvents='inherit';
}}
}
window.onload=function(){setTimeout(function(){allow_Mon()},1000);};
</script>
Plugin Author
RLDD
(@rermis)
Correction: To allow this to work after navigating time periods in forward or reverse, please change the last line to:
window.onload=function(){setInterval(function(){allow_Mon()},3000);};