This project is read-only.

JQuery problem....

Topics: Troubleshooting, Writing modules
Feb 23, 2012 at 7:17 PM


I have implemented a datepicker in my custom view and it all works perfectly, except from that i have a small textbox in the bottom of the html page when i render the view. When i hover over the textbox its throws a javascipt exception. 

@model TestModule.Models.Test


<script type="text/javascript">
    $(document).ready(function () {
        $('#date').datepicker({ dateFormat: "yy-mm-dd",
            firstDay: "1"
   @Html.TextBoxFor(model => model.Date, new { @id = "date", @Value = "YYYY-MM-DD"})

but as i said in the bottom of the page it shows a wired textbox, thats disappears when i klick the "date" textbox. i will try to add a picture of the "Wired" textbox..


Feb 23, 2012 at 8:34 PM

Here is an link the a printscreen where i have cut out the wired field thats comes up.  When i hover it i got the following js error

SCRIPT5007: Unable to get value of the property 'inline': object is null or undefined

jquery.ui.datepicker.js, line 1755 character 4

if ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) ||
					!elem.length ) {


can someone help me?

Feb 23, 2012 at 8:43 PM

Looks like a jQuery issue, not Orchard. I do notice that your date formats are completely different though.

Feb 24, 2012 at 5:24 AM

If I read you code correctly it appears that you have omitted the styling for the jQuery UI.

Also include in your view where you have declared the Script.Require the folowing:


Also try not including your script in the Head, move to Foot.

Feb 24, 2012 at 7:02 AM

Thx for the replay, Grapo i have tried to include and change the posistion of the script aswell as the css for jquery and it doens´t work. Bertrand, you are probably right about its a jquery issue and rather then Orchard.