Opened 14 years ago

Closed 13 years ago

#4744 closed enhancement (notabug)

Datepicker in ASP.NET 2.0 (inside controls) and IE problems

Reported by: Blaz Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


Most of the users with more experiences probably already know this but others can have problems when implementing datepicker to ASP.NET controls, for example textbox (especially if they are inside other control - web form, repeater).

This is a solution somebody posted on forums:

1.) "Change the TextBox's CssClass property to "dateTextBox". Then, use exactly this JavaScript (remove the other inline script in that area so there are no extraneous errors):"

1.) (inside web form, control, etc.) <script type="text/javascript">

$(document).ready(function() {




2.) if you do not have web control. You also don't need the css.

<script type="text/javascript">

$(function ()




also you must have in masterpage the following code: <link type="text/css" href="../CSS/jquery- ui-1.7.2.calendar.css"rel="stylesheet" /> <script type="text/javascript" src="../JS/jquery-1.3.2.min.js" ></ script> <script type="text/javascript" src="../JS/jquery- ui-1.7.2.custom.min.js"></script>

<script type="text/javascript">


Datepicker $('#datepicker').datepicker({

inline: true


hover states on the static widgets $('#dialog_link, ul#icons li').hover(

function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); }




There can be better options to do this. Also you must notice that this don't work in IE ("appearing" effect) as same as is working if you have input type on page without any controls.

Any additional comments are welcome.

Change History (2)

comment:1 Changed 14 years ago by Jörn Zaefferer

Component: ui.coreui.datepicker
Milestone: TBD1.8
Type: bugenhancement

This looks more like a documentation issue, though so far we don't cover any server-side specific integration scenarios.

comment:2 Changed 13 years ago by Scott González

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.