开发者

jquery datepicker animation options wont work

I have a textbox which has JQuery UI DatePicker control registered to it. It works fine but when I try to add animation options, control itself wont work.

<head runat="server">
<script>
    $(document).ready(function() {
        $("#TextBox1").datepicker("option", "showAnim", 'slideDown');
    });
</script>
</head>
<body>
    <form id="form开发者_JAVA技巧1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </div>
    </form>
</body>

Without the options, the picker would at least show itself. Can someone tell me a solution and better, what's happening? Thanks!


define options after init:

// initialization (~= constructor)
$("#TextBox1").datepicker();
// set options
$("#TextBox1").datepicker("option", "showAnim", 'slideDown');

or at the same time:

// initialization + options (~= constructor with args)
$("#TextBox1").datepicker({showAnim: 'slideDown'});

to resize it add this style to your html file after the <link> to jquery.ui.all.css (or in your custom .css):

<style type="text/css">
    div.ui-datepicker{
     font-size:...px;
    }
</style>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜