Skip to content

Commit

Permalink
add calendar listener for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mart2070 committed Feb 3, 2025
1 parent e360cd0 commit 1978c70
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tdx-enhanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,19 @@
newCal.id = `${calendar.id}-new`
newCal.classList = calendar.classList
newCal.type = "datetime-local"

function updateDate() {
//update old tdx calendar
let parsedFormat = date.format(originalFormat)
calendar.value = parsedFormat

//update new calendar
let iso = date.format(newFormat)
newCal.value = iso
calTxt.innerText = date.calendar()

console.log("Cal update!",date)
}

//convert to original format
newCal.addEventListener("input",event=>{
Expand Down

0 comments on commit 1978c70

Please sign in to comment.