This is a migrated thread and some comments may be shown as answers.

RadDatePicker MinDate error with lytebox.js include

3 Answers 64 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 03 Jun 2009, 08:35 PM
Just thought I would post this in case anyone ever runs into the same error. It took me a while to isolate it. Apparently setting the mindate on a RadDatePicker when you include the lytebox.js file causes the following error:

this["get_" + _24[i]] is not a function
saveClientState()(["minDateStr", "maxDateStr" 0=minDateStr 1=maxDateStr])Telerik....3a59462f1 (line 2075)
createCallback()(Object _element=input#picker_dateInput.rdfd_, "saveClientState", [["minDateStr", "maxDateStr" 0=minDateStr 1=maxDateStr] 0=[2]])Telerik....3a59462f1 (line 6)
saveClientState()()Telerik....3a59462f1 (line 3811)
updateClientState()()Telerik....3a59462f1 (line 846)
_propagateRangeValues()()Telerik....3a59462f1 (line 1406)
_initializeDateInput()()Telerik....3a59462f1 (line 1372)
initialize()()Telerik....3a59462f1 (line 1098)
createCallback()()Telerik....3a59462f1 (line 6)
createCallback()()Telerik....3a59462f1 (line 6)
createCallback()()Telerik....3a59462f1 (line 6)
createCallback()()Telerik....3a59462f1 (line 6)
_25[_24[i]]=this["get_"+_24[i]]();
 
DatePickerErrorTest.aspx
<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="DatePickerErrorTest.aspx.cs" Inherits="DatePickerErrorTest" %> 
<html> 
<head runat="server"
   
</head> 
<body> 
<form runat="server"
  <telerik:RadScriptManager runat="server" /> 
  <telerik:RadDatePicker id="picker" runat="server" skin="WebBlue" /> 
</form> 
</body> 
</html> 

DatePickerErrorTest.aspx.cs
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.HtmlControls; 
 
public partial class DatePickerErrorTest : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        HtmlGenericControl script = new HtmlGenericControl(); 
        script.TagName = "script"
        script.Attributes.Add("type""text/javascript"); 
        script.Attributes.Add("src", Page.ResolveUrl("~/Controls/Lytebox/lytebox.js")); 
        Page.Header.Controls.Add(script); 
        picker.MinDate = DateTime.Now; 
    } 

LyteBox version is 3.20
Telerik.Web.UI version is 2008.3.1314.35

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 08 Jun 2009, 10:32 AM
Hello Eric,

I have tried to replicate described behavior using 2009.1.402.35 version of RadControls for ASP.NET AJAX and 3.22 version of LyteBox, but I was not able.
For your convenience I am sending you sample code that show the scenario I have tried. Can you please take a look at the code and tell what I am missing?

Indeed I noticed that LyteBox prototypes Array object which generally might breaks existing scripts that relay on iterating array properties(using for(.. in..) ). You can read more on theme on the following link:
http://dean.edwards.name/weblog/2006/11/hooray/

Yours,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Eric
Top achievements
Rank 1
answered on 08 Jun 2009, 09:26 PM
Looks like it's the dll. Your project worked fine. I then replaced lytebox 3.22 with 3.20 and all was still good. I reverted back to lytebox 3.22 and replaced your Telerik.Web.UI.dll version 2009.1.402.35 with my Telerik.Web.UI.dll  version 2008.3.1314.35 and the error came back.

Thanks for your help on this, Nikolay
0
Nikolay Rusev
Telerik team
answered on 09 Jun 2009, 02:22 PM
Hi Eric,

Please use Q1 SP2 of RadControls for ASP.NET AJAX if it is working in your scenario.
There seems to be certain changes in RadDatePicker since version 1314.

Greetings,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Calendar
Asked by
Eric
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Eric
Top achievements
Rank 1
Share this question
or