Advertisement
VladislavNechepaev

Untitled

May 11th, 2021
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const parkingElems = document.getElementsByClassName("parkingwrapper")
  2.         const dateBoundary = new Date('2021-05-17')
  3.         const nowLocal = new Date()
  4.         if (officeParking.includes(values.office) && hasParkingId && (dateBoundary < nowLocal || values.access_week === "Next week")) {
  5.           for(let elem of parkingElems) {
  6.             elem.style.display = "inline-flex"
  7.           }
  8.         } else {
  9.           for(let elem of parkingElems) {
  10.             elem.style.display = "none"
  11.             elem.querySelector("input").checked = false
  12.           }
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement