fix/improve parsing of last active dates

parseDT only uses the magic json.Unmarshal method if theres an error
with the better version. Error came from some times being sent without a
"Z" at the end denoting UTC.
This commit is contained in:
Harvey Tindall
2020-12-03 20:49:50 +00:00
parent 3c952d21f7
commit a1e30ff5db
7 changed files with 96 additions and 79 deletions
+6
View File
@@ -1,5 +1,11 @@
declare var window: Window;
export function createEl(html: string): HTMLElement {
let div = document.createElement('div') as HTMLDivElement;
div.innerHTML = html;
return div.firstElementChild as HTMLElement;
}
export function serializeForm(id: string): Object {
const form = document.getElementById(id) as HTMLFormElement;
let formData = {};