Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const parkingElems = document.getElementsByClassName("parkingwrapper")
- const dateBoundary = new Date('2021-05-17')
- const nowLocal = new Date()
- if (officeParking.includes(values.office) && hasParkingId && (dateBoundary < nowLocal || values.access_week === "Next week")) {
- for(let elem of parkingElems) {
- elem.style.display = "inline-flex"
- }
- } else {
- for(let elem of parkingElems) {
- elem.style.display = "none"
- elem.querySelector("input").checked = false
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement