Skip to main content

Search and Top Navigation

#4744 closed enhancement (notabug)

Opened August 04, 2009 08:35AM UTC

Closed October 26, 2010 01:24PM UTC

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:
Description

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 asp.net 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() {

$('.dateTextBox').datepicker();

});

</script>

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

<script type="text/javascript">

$(function ()

{$('#date').datepicker();}

);

</script>

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">

$(function(){

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'); }

);

});

</script>

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.

Attachments (0)
Change History (2)

Changed November 16, 2009 10:06AM UTC by jzaefferer comment:1

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.

Changed October 26, 2010 01:24PM UTC by scottgonzalez comment:2

resolution: → invalid
status: newclosed