Added schedule clearing and scroll to drag to schedule panel.

This commit is contained in:
rainbow napkin 2025-02-07 06:01:20 -05:00
parent 56ab5a16ec
commit c04edb6691
8 changed files with 466 additions and 120 deletions

View file

@ -76,6 +76,29 @@ class canopyUXUtils{
return new Date(date.getTime() + (date.getTimezoneOffset() * 60000));
}
timeStringFromDate(date, displaySeconds = true){
let outString = ''
//If scale is over a minute then we don't need to display seconds
const seconds = displaySeconds ? `:${('0' + date.getSeconds()).slice(-2)}` : ''
//If we're counting AM
if(date.getHours() < 12){
//Display as AM
outString = `${('0'+date.getHours()).slice(-2)}:${('0' + date.getMinutes()).slice(-2)}${seconds}AM`
//If we're cointing noon
}else if(date.getHours() == 12){
//display as noon
outString = `${('0'+date.getHours()).slice(-2)}:${('0' + date.getMinutes()).slice(-2)}${seconds}PM`
//if we're counting pm
}else{
//display as pm
outString = `${('0'+(date.getHours() - 12)).slice(-2)}:${('0' + date.getMinutes()).slice(-2)}${seconds}PM`
}
return outString;
}
//Update this and popup class to use nodes
//and display multiple errors in one popup
displayResponseError(body){