The code was updated and refactored. The structure was changed overall and settings were added to the calendar field.
Based on the feedback I received, I decided to update the code. Also, please give me feedback on the changes so I can make this better.