Last active
October 18, 2022 21:31
-
-
Save BenOsodrac/5a496a5d40d62590dcb5d5a0ca637c87 to your computer and use it in GitHub Desktop.
Class Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCompanyDatePicker { | |
// Public field declarations; | |
pickerId; | |
// Private field declarations | |
#onDateSelectEvent; | |
constructor(datePickerId, onDateSelectEventHandler){ | |
this.pickerId = datePickerId; | |
this.#onDateSelectEvent = onDateSelectEventHandler; | |
// Init custom picker and call mount() method | |
} | |
mount() { | |
// Do the code we need create the custom funcionalities | |
} | |
update() { | |
// Update any dynamic html elements and trigger the OnDateSelected event back to the platform | |
} | |
onApply() { | |
// Mwthod that applies the selected dates | |
} | |
onReset() { | |
// Method that resets the selcted dates | |
} | |
destroy() { | |
// remove any HTML elements and listeners created and destroy the instance | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment