Datepicker client script

112 views
Skip to first unread message

kashwaa

unread,
May 16, 2012, 7:09:24 AM5/16/12
to Juice UI
I'm trying to invoke a client side script on datepicker select, I
wrote this code:

<script type="text/javascript">
$(document).ready(function () {
$('#TextBox5').datepicker({
onSelect: function (dateText, inst) { $
("#TextBox4").datepicker( "setDate" , dateText ); }
});
});
</script>

It seems to work but it disrupts the date picker linked to TextBox5,
It doesn't seem to be able to correctly handle it's properties.i.e.
date format and min date are not set,

<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<juice:Datepicker runat="server" ID="date1"
DateFormat="dd/mm/yy"
MinDate="Today"
TargetControlID="TextBox5" />

Is there any solution to this?

Andrew Powell (appendTo)

unread,
May 21, 2012, 8:38:57 AM5/21/12
to jui...@googlegroups.com
Please reply with the code for TextBox4. Without seeing everything, there's no way I can accurately diagnose the problem.

I can tell you that what you're doing isnt necessary though. Use the AltField property http://juiceui.com/controls/datepicker#option-altField
Reply all
Reply to author
Forward
0 new messages