feat: Integrate date in task bar
- Date format can now be changed dynamically - Date element is now created in task bar class - Class can accept options, currently only for date - Date format is changed according to position - Changed dom structure for clock - Refactor setPosition method to be more flexible - Changed flex style for task bar items to inherit the direction
This commit is contained in:
parent
abf393191c
commit
20b43b8d35
4 changed files with 117 additions and 53 deletions
|
|
@ -296,6 +296,12 @@ class DateDisplay {
|
|||
this.element.textContent = this.formatDate(now);
|
||||
}
|
||||
|
||||
changeFormat(format) {
|
||||
this.options = format;
|
||||
|
||||
this.updateDate();
|
||||
}
|
||||
|
||||
getTimeUntilNextMidnight() {
|
||||
const now = new Date();
|
||||
const nextMidnight = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue