/holiday-dayformatter.js Secret
Last active
February 9, 2023 06:39
休日を表示するDayFormatter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let result = apex.server.process("GET_HOLIDAYS"); | |
result.done( (data) => { | |
window.holidays = data; | |
console.log("holidays loaded."); | |
// | |
apex.item("P1_DATE3").dayFormatter = (pDate) => { | |
const d = window.holidays.find(e => e.day == pDate); | |
if (d != null) { | |
return { | |
disabled: false, // またはtrue | |
class: "u-danger-text", | |
tooltip: d.name | |
}; | |
} | |
} | |
apex.item("P1_DATE3").refresh(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment