Fuck JS
This commit is contained in:
@@ -37,22 +37,22 @@ function updateDates(value: number) {
|
|||||||
store.toggleDate(value)
|
store.toggleDate(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayError(message: string, target : Element) {
|
function displayError(message: string, target : HTMLElement) {
|
||||||
target.style.border = "2px solid red";
|
target.style.border = "2px solid red";
|
||||||
errorMessage.value = message;
|
errorMessage.value = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetError(target : Element){
|
function resetError(target : HTMLElement){
|
||||||
target.style.border = "2px solid black";
|
target.style.border = "2px solid black";
|
||||||
errorMessage.value = "";
|
errorMessage.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNameField() : Element {
|
function getNameField() : HTMLElement {
|
||||||
return document.getElementsByClassName("input-field")[0];
|
return document.getElementsByClassName("input-field")[0] as HTMLElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCalendar() : Element {
|
function getCalendar() : HTMLElement {
|
||||||
return document.getElementsByClassName("calendar-container")[0];
|
return document.getElementsByClassName("calendar-container")[0] as HTMLElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user