This is a migrated thread and some comments may be shown as answers.
Datepicker issue with window
14 Answers 117 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Uma
Top achievements
Rank 1
Uma asked on 07 Oct 2010, 09:19 PM
Hi,
I'm using a window to open the partial view which has datepicker control as one of its fields. The partial view is inside a Div tag. On successful submission of the form data, returning a confirmation partial view in the same window object. Everything is working fine but displaying ''i' is null or not an object' error on the status bar. Any ideas/ suggestions why this error is coming? Please check the below code..fyi using 2010.2.930 version.

Opening window Code:
var url = '<%= Url.Action("Add", "Trap") + "?Locations=" %>' + list;
$.post(url, function(data) {
    var window = $('#Window').data('tWindow');
    window.content(data);
    window.center().open();
});

Partial View Code:
<script type ="text/javascript">
    function closeWindow() {
        var window = $("#Window").data("tWindow");
        window.close();
    }  
</script>
      
<div id="StockArea">
  
    <% using (Ajax.BeginForm("AddStock", "Pile", null, new AjaxOptions { UpdateTargetId = "StockArea" }))
       {%>
        <%= Html.ValidationSummary(true) %>
          
            <fieldset>
            <div class="editor-label">
                <%= Html.LabelFor(model => model.IdentificationNumber) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.IdentificationNumber) %>
                <%= Html.ValidationMessageFor(model => model.IdentificationNumber) %>
            </div>
              
            <div class="editor-label">
                <%= Html.LabelFor(model => model.CreateDate) %>
            </div>
            <div class="editor-field">
                <%= Html.Telerik().DatePickerFor(model => model.CreateDate)
                                  .Name("CreateDate")
                                  .Value(Model.CreateDate >= DateTime.Today ? Model.CreateDate : DateTime.Today)
                                  .ShowButton(true)     %>
                <%= Html.ValidationMessageFor(model => model.CreateDate) %>
            </div>            
       <fieldset>  
        <p>            
            <input type="submit" id="save" value="Save" name ="button" class="submitButtonStyle"  />
            <input type="button" value="Cancel" name ="button" class="submitButtonStyle cancel" onclick = "closeWindow()" />
        </p>
        </fieldset>  
     <% } %>
</div>

AddStock action Code: (displays confirmation message )
if (ModelState.IsValid)
{                        
     _repository.AddPileDetails(model, this.CarifendUser.WarehouseId, this.CarifendUser.UserId);
     ViewData["SuccessMsg"] = ViewsSharedRes.SharedStrings.PileAddSuccessText;
     return PartialView("ConfirmationControl");
}
//Incase of failure
return PartialView("AddStock", model);

Currently working on this issue, really appreaciate any help.

Thanks,
Uma

14 Answers, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 08 Oct 2010, 03:06 PM
Hi Uma,

I am using 2010.2.930 version of Telerik ASP.NET MVC components and I can't find problems.

I am sending the test project. What is different in your case?

Kind regards,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Uma
Top achievements
Rank 1
answered on 08 Oct 2010, 03:32 PM
Hi Hristo Germanov,
Thanks for the response...in my case, if i don't select the date value from datepicker(default to today's date), the issue is not coming. Only when i select any value from datepicker and on successful submission i'm getting this issue.. you can see the code in my previous post..just fyi, Opening a modal window which displays a partial view. Parital view is in a Div tag with datapicker control. On successful submisson, again displaying confirmation message redendered by partial view in the same window...

If possible, in the your test project can you replicate the scenario please..

Regards,
Uma
0
Hristo Germanov
Telerik team
answered on 08 Oct 2010, 05:11 PM
Hi Uma,

I am not sure what exactly your scenario is. Could you please modify the attached project, so I will be able to give my best in resolving the problem?

Sincerely yours,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Uma
Top achievements
Rank 1
answered on 08 Oct 2010, 05:52 PM
Hi Hristo Germanov,
Thanks for your response..i'm getting some script error while running your test project, so I have created a new project(same name as your test project) in VS2008 and attached below.

You can see the error by following the below steps.
1. Select any date from calender and click on Save button.
2. Confirmation text will display and again click in Close button.

There you go, the issue will come..

Hope i have included the script in right way..

Regards,
Uma
0
Hristo Germanov
Telerik team
answered on 11 Oct 2010, 07:24 AM
Hello Uma,

When I follow the steps in your attached project I could not find the problem. Please examine the  screen cast and tell me if I am doing something wrong.

Best wishes,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Uma
Top achievements
Rank 1
answered on 15 Oct 2010, 03:09 PM
Hi Hristo Germanov,
Thanks for your response. Whatever steps you followed are correct only, i wonder howcome you are not able to see the issue. I'm attaching the script error image below. Fyi, i'm using VS2008(.net 3.5 framework).
0
Hristo Germanov
Telerik team
answered on 18 Oct 2010, 02:03 PM
Hello Uma,

I confirm this is a bug, which I am glad to inform you that it is already fixed.

I have attached the modified file.

I have update your Telerik points.

All the best,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Uma
Top achievements
Rank 1
answered on 18 Oct 2010, 04:58 PM
Hi Hristo Germanov,
Thanks for confirming the issue as bug, but the fix provided is not working, getting "Microsoft JScript runtime error: Object doesn't support this property or method" error on selecting the calender icon itself. What i have done is just replaced the old "telerik.datepicker.min" script file with the modified one provided by you.
Please let me know if i'm missing anything here. Attached is the error image.

Regards,
Uma
0
Hristo Germanov
Telerik team
answered on 19 Oct 2010, 08:49 AM
Hi Uma,

Accept my apologize for wrong attached file. Please update your project with the attached file and if you have any problems, please tell us.

Sincerely yours,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Uma
Top achievements
Rank 1
answered on 19 Oct 2010, 02:50 PM
Hi Hristo Germanov,
Still getting the same issue "Microsoft JScript runtime error: Object doesn't support this property or method".
Fyi, i don't find any differences between the previous & latest attached script files.

Regards,
Uma
0
Accepted
Hristo Germanov
Telerik team
answered on 19 Oct 2010, 04:01 PM
Hello Uma,

Attached is modified project with hotfix version and hotfix version of Telerik ASP.NET MVC components.

Again, please accept my apologize.

Sincerely yours,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Uma
Top achievements
Rank 1
answered on 19 Oct 2010, 04:13 PM
Hi Hristo Germanov,
Thanks for your quick response. Do you want me to update my project will all the scripts or only with "telerik.datepicker.min" file in scripts folder?

Regards,
Uma
0
Hristo Germanov
Telerik team
answered on 20 Oct 2010, 08:53 AM
Hi Uma,

Please, update to hotfix version and if you have further problems feel free to ask.

Greetings,
Hristo Germanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Uma
Top achievements
Rank 1
answered on 21 Oct 2010, 02:23 AM
Hi Hristo Germanov,
Thanks for your reponse.I really appreciate it. It worked...

Regards,
Uma
Tags
Window
Asked by
Uma
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Uma
Top achievements
Rank 1
Share this question
or