1

I am making a webpage and have used jquery-3.2.1.min.js , jquery-ui.min.js and animsition.min.js. I am using datepicker for capturing date using following code :-

$(document).ready(function() {
$("#datepicker").datepicker({
dateFormat: "dd-mm-yy" ,
navigationAsDateFormat: true,
    onSelect: function() {
report_date= $("#datepicker").val();
    }
 });
});

In Body I have used simple code as:

Date: <input type="text" size="10" id="datepicker">

Problem is that when i use the datepicker to get date and click on next month it initally shows new month but then navigates to another page with message "The requested URL /undefined was not found on this server". I tried checking up in chrome developer option and concluded that the mouse click event is being captured by animsition.min.js and probably this is taking it to a new undefined page. On disabling this event in chrome the datepicker worked correctly. But how do I do this in my code ??

Screen Shot of Chrome Inspect element output enter image description here

Avinash
  • 1,187
  • 9
  • 18

3 Answers3

0

You are probably using some kind of CSS animations on the pages on your site as I was. In fact I have the same "animsition" class that you are showing above.

Please change you body tag from to and your next and previous month buttons will now work. I also had issues with the JGQRID JS (Guriddo and Trirand) where the export function would not work either. Removing that class from the body tag also fixed that.

The only drawback is that you lose the page fade in/fade out animations.

MikeM
  • 13
  • 4
0

I had the same problem and it took me half day to solve this. In my case, the datepicker is conflict with the animsition plugin. My solution is a global variable:

var no_fade = false;

Change this value to true when click the datepicker:

$('.ui-datepicker').click(function(){
    no_fade = true;
});

In the animsition settings:

$(".animsition").animsition({
  inClass: 'fade-in',
  outClass: function(){
    if (no_fade) {
      no_fade = false;
      return '';
    } else
      return 'fade-out';
  },
  inDuration: 900,
  outDuration: 900,
  ...
});
0

you can use:

linkElement: 'a:not([target="_blank"]):not([href^="#"]):not(.ui-datepicker-next):not(.ui-datepicker-prev)'

in your anismition config