jQuery UI & Datepicker: Datepicker with animations

This entry is part 3 of 14 in the series jQuery UI Datepicker

jQuery UI Datepicker – Animations

Use different animations when opening or closing the datepicker.

Choose an animation from the dropdown, then click on the input to see its effect.

You can use one of the three standard animations or any of the UI Effects.

<!doctype html>
<html lang='en'>
    <meta charset='utf-8'>
    <title>jQuery UI Datepicker - Animations</title>
    <link rel='stylesheet' href='//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css'>
    <script src='//code.jquery.com/jquery-1.10.2.js'></script>
    <script src='//code.jquery.com/ui/1.10.4/jquery-ui.js'></script>
    <link rel='stylesheet' href='http://codecrawl.com/code/jqueryui/jqueryui_style.css'>
        $(function () {
            $('#anim').change(function () {
                $('#datepicker').datepicker('option', 'showAnim', $(this).val());

<p>Date: <input type='text' id='datepicker' size='30'></p>

    <select id='anim'>
        <option value='show'>Show (default)</option>
        <option value='slideDown'>Slide down</option>
        <option value='fadeIn'>Fade in</option>
        <option value='blind'>Blind (UI Effect)</option>
        <option value='bounce'>Bounce (UI Effect)</option>
        <option value='clip'>Clip (UI Effect)</option>
        <option value='drop'>Drop (UI Effect)</option>
        <option value='fold'>Fold (UI Effect)</option>
        <option value='slide'>Slide (UI Effect)</option>
        <option value=''>None</option>

Try The Code Datepicker Widgets API Doc
Series Navigation<< jQuery UI & Datepicker: Show the week of the year
jQuery UI & Datepicker: Select a date range >>

Leave a comment

Leave a Reply