nano
nano

Reputation: 687

How does one disable animation in jquery-ui datepicker?

I'm generally averse to animation effects given the overheads of reflow on the client side browser.

jquery-ui is an awesome widget. It has all the stuff I need. But is there a way to disable the animation -- in other words the widget just appears instead of sliding out or fading in?

Upvotes: 20

Views: 8255

Answers (2)

Joe Holloway
Joe Holloway

Reputation: 28948

One way to achieve this (prior to jQuery UI 1.8) is to set the duration option to empty string.

$('.date').datepicker({
    duration: ''
});

UPDATE Dec 6, 2010:

In jQuery UI 1.8+, this is a documented feature of the showAnim option.

$('.date').datepicker({
    showAnim: ''
});

Upvotes: 37

yoda
yoda

Reputation: 10981

Currently jquery datepicker plugin doesn't have any parameter to avoid animations.

Upvotes: -4

Related Questions