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="form1" 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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With