New functionality - Time (weekday + time) scheduler / duration (#2802)

This commit is contained in:
dgtlmoon
2024-12-03 12:45:28 +01:00
committed by GitHub
parent c6162e48f1
commit 7421e0f95e
18 changed files with 1094 additions and 45 deletions

View File

@@ -24,8 +24,18 @@ $(document).ready(function () {
$(target).toggle();
});
// Time zone config related
$(".local-time").each(function (e) {
$(this).text(new Date($(this).data("utc")).toLocaleString());
})
const timezoneInput = $('#application-timezone');
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
if (!timezoneInput.val().trim()) {
timezoneInput.val(timezone);
timezoneInput.after('<div class="timezone-message">The timezone was set from your browser, <strong>be sure to press save!</strong></div>');
}
});