Support » Plugin: Dynamic Time » Disabling saturdays and sundays from filling

  • Resolved subhamkotnala


    I want to disable saturdays and sundays from the time report. The user should not be able to fill time report for saturdays and sundays. Also the user should not be allowed to fill on some specific days.
    Can I achieve this?
    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Rhett


    Hi Subhamkotnala,

    Sure, give this a try by pasting it into a custom html block on the same page as the shortcode. You may need to edit it for perfection:

    <script type="text/javascript">
    function block_wkd() {
      var dyt_days=document.getElementsByClassName('dyt_day');
      for(var i = 0; i < dyt_days.length; i++) {
        if(dyt_days[i].innerHTML.includes('Sat')>0 || dyt_days[i].innerHTML.includes('Sun')>0) {

    Great, It works. Thanks a lot 🙂

    Hi Rhett,
    A small correction. The saturdays and sundays are editable in next periods. The problem is we are calling the js function on windows.load . The next period and prev period are AJAX calls. So how can we fix it?

    Plugin Author Rhett


    Great catch, to resolve, change the last line to

    Cool, works fine now. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.