Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #104165
    Carlos
    Participant

    can this plugin allow variable restricted hours (per day) instead of setting restricted hours for all week?

    #104170
    Markov
    Keymaster

    Hi Carlos,

    There is a new property which is still in test phase, but it is available in the current version. It is called restricted. You can set an array with restricted dates and hours by using that property.

    Example:

    
    const today = new Date(), currentDate = today.getDate(), currentYear = today.getFullYear(), currentMonth = today.getMonth()
    
         restricted: [
                    { date: new Date(currentYear, currentMonth, currentDate), hours: [[0, 6], 12, [20, 23]] },
                    { date: new Date(currentYear, currentMonth, currentDate - 2), hours: [[0, 3], 12, [20, 21]] },
                    { date: new Date(currentYear, currentMonth, currentDate + 2), hours: [[0, 3], 13, [21, 22]] },
                    { date: new Date(currentYear, currentMonth, currentDate - 5), hours: [[0, 3], 13, [21, 22]] },
                    { date: new Date(currentYear, currentMonth, currentDate + 5), hours: [[0, 7], 13, [21, 22]] },
                    { date: new Date(currentYear, currentMonth, currentDate - 10), hours: [[0, 8], 12, [20, 23]] },
                    { date: new Date(currentYear, currentMonth, currentDate + 10), hours: [[0, 9], 12, [20, 23]] }
                ] 

    Hope this helps.

    Best regards,
    Markov

    Smart UI
    https://www.htmlelements.com/

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