Problem with datepicker and tooltip
Hi
I m getting some trouble with datepicker and tooltips : everything is okay if i don't click.
once i click on a date or i click on the next month, the tooltips css and animations are disabled.
here is the script :
- <script type="text/javascript">
- $(function(){
- var specialDays = { '2011': { '3': { '10': {tooltip: "Some event", className: "holiday"} }, '4': { '15': {tooltip: "Some another event", className: "holiday"} , '10': {tooltip: "Some event", className: "holiday"} } }};
- $('#datepicker').datepicker({beforeShowDay: function(date) {
- var d = date.getDate(), m = date.getMonth()+1,
- y = date.getFullYear();
- if (specialDays[y] && specialDays[y][m] && specialDays[y][m][d]) { var s = specialDays[y][m][d];
- return [true, s.className, s.tooltip]; // selectable
- } return [true,'']; // non-selectable
- }});
- /* tooltip*/
- $(".ui-datepicker-calendar").tooltip({
- open: function() {
- $(".ui-tooltip").stop(false, true).hide().slideDown();
- },
- close: function() {
- $(".ui-tooltip").stop(false, false).show().slideUp(function() { $(this).remove(); })
- }
-
Thanks for your help