-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
e.g. add a warning if the date is in the past or the user selected sunday as a starting date (since for internationals the sunday regulation is unusual)
i was thinking about something like this but i think i would prefer having a yellow box for warnings, if possible:
const selectedDate = new Date(document.getElementById("date").value);
const today = new Date();
if (selectedDate<today) {
const toastTrigger = document.getElementById('startRouting');
const toastLiveExample = document.getElementById('liveToast');
if (toastTrigger) {
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastLiveExample);
const errmsg = document.getElementById('errmsg');
errmsg.textContent = "You cant select a day thats in the past";
toastBootstrap.show();
}
return -1;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels