Adding jquery-ui and datepicker
Fixing the date sorting thing
Fixed improper logic
Fleshing out.