Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI Datepicker - Being able to pick day or month

I'd like to know if there is any way to be able to select a whole month in jQuery UI's Datepicker while still being able to select a single day.

I tried 'hacking' it by adding an onClick event to the title div after page load, but switching months seems to completely replace the div, thus losing the onClick.

Are there any other solutions? Or maybe an alternative which offers this option?

like image 797
Jukurrpa Avatar asked Mar 12 '13 11:03

Jukurrpa


1 Answers

Your onClick event should be enough. You just need to use a jQuery event handler that works for dynamic links.

If < jQuery 1.7, use: live()
Else If >= jQuery 1.7, use: on()

like image 68
Akahadaka Avatar answered Sep 28 '22 14:09

Akahadaka