I’ve been playing with a massive Kendo UI Grid for the past few months. I really enjoy Kendo UI – I can build functionality quickly, and the forums are very active and helpful. But there is so much grid I can take!!
Plus, today is the 34th anniversary of my first unbirthday!
See the Unbirthday Calculator at the bottom of this blog post.
Despite the absurdity of the purpose of this project, these are my takeaways from this exercise:
- Initialize a Kendo UI DatePicker
- Apply a validator to a form field
- A renewed, deepened understanding of the Date Object
Working with the Kendo UI DatePicker
As with all the Kendo UI Widgets, there is ample examples and documentation provided by the Kendo UI Team.
One thing that stumped me is how to allow the user to type in a date, validate the input, then trigger the change event of the DatePicker. I was confused as to why I couldn’t trigger the change event of the DatePicker by typing in a value. This led me to implement a Validator, as well as a ‘keyup’ event handler for when the user presses ‘Enter’ and submits their input. By wrapping my DatePicker in a Validator, and adding a ‘keyup’ event handler, I am able to allow the user to type in a value if they choose to.
Take a look at all the code to see for yourself what I’m talking about!
Without further ado, here is the unbirthday calculator.
Special Thanks to…
@Event_Hoorizon for creating this simple codepen showing how to create confetti.