Skip to main content

Search and Top Navigation

#7495 closed bug (notabug)

Opened June 22, 2011 12:57PM UTC

Closed June 27, 2011 12:56PM UTC

DatePicker in dialog causes Out of stack error.

Reported by: Soozook Owned by: Soozook
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.13
Keywords: Cc:
Blocked by: Blocking:
Description

I have a datepicker on a dialog. To reproduce the problem.

1) Open Dialog

2) select a date

3) Press Cancel on dialog to close it.

4) reopen dialog.

5) Try to select a date.

The code reports an Out of Stack Error on this code

d.datepicker._updateDatepicker(b)

The date picker is a plane input control with thsi code on the dialog cshtml document

            $("#SessionDate").datepicker({
                dateFormat: 'dd/mm/yy'
            });

The Dialog is defined like this on the main cshtml document


        $(function () {

            $('a.asessionCreate').live("click", function (event) { editDialog(this, event, '#DivForCallback', '#IdGivenToPostBackFormOnDialog); });

        });   /* end document.ready() */


function editDialog(tag, event, target, formId) {
    event.preventDefault();
    var $url = $(tag).attr('href');
    var $title = $(tag).attr('title');
    var $dialog = $('<div></div>');
    $dialog.empty();
    $dialog
            .load($url)
		    .dialog({
		        autoOpen: false
			    , title: $title
			    , width: 500
                , modal: true
			    , minHeight: 200
                , show: 'fade'
                , hide: 'fade'
		    });

    $dialog.dialog("option", "buttons", {
        "Cancel": function () {
            $(this).dialog("close");
            $(this).empty();
        }
    });
};
Attachments (0)
Change History (3)

Changed June 22, 2011 01:30PM UTC by rdworth comment:1

owner: → Soozook
status: newpending

As noted on this form "Please use jsFiddle or jsbin to provide test cases instead of pasting large blocks of code in the ticket."

Changed June 27, 2011 11:19AM UTC by Soozook comment:2

status: pendingnew

After further investigation this does not appear to be a JQuery Issue. I am also using a Timepicker plugin on this dialog.

http://trentrichardson.com/examples/timepicker/

Removing the timepicker plugin resolves the datepicker problem.

Please close this issue.

Changed June 27, 2011 12:56PM UTC by scottgonzalez comment:3

resolution: → invalid
status: newclosed