Tuesday, March 22, 2011

Mootools 1.3 DatePicker class

I think that DatePicker mootools class by monkeyphysics is fantastic. It is fast, well written, it has a nice layout and some awesome options like the inputOutputFormat one. Recently I upgrade to mootools 1.3 without compatibility in a project of a php framework which uses this class.
So I need to make DatePicker class working with the new release of my favourite js framework.
During the upgrade work I found and fixed a bug in the date selection when selecting a day of the previous/next year in january/december months view.
Moreover I added the z-index management so that the calendar is always shown above all document elements.
Maybe more improvemets will come in the next future.
My project is a fork of the original one and hosted on my github repository.
From command line you may simply clone my project
git clone git://github.com/abidibo/mootools-datepicker.git


Kasimir den Hertog said...


Great work on this. I was making an effort myself to get it compatible with 1.3, but got kind of stuck with the code for actually selecting dates. You've cleared this up. However, I suspect I came a across a slight bug in line 439. I think:


should be


As I got only todays date (I only use date picking). Now it works great!

abidibo said...

@Kasimir den Hertog
I just want to thank you for you bug reporting. I'll fix it now.
Thanks, good job.