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

sharing calendar popup between DatePicker and DateTimePicker

3 Answers 63 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
tomas
Top achievements
Rank 1
tomas asked on 04 Feb 2009, 11:11 PM

Hello.

1) my generated html is a quite different then your sample code. My html contains many such stylesheet markup for every calendar in a page:

<!-- 2008.3.1125.35 --><input style="visibility:hidden;display:block;float:right;margin:0 0 -1px;width:1px;height:1px;overflow:hidden;border:0;padding:0;" id="RadDatePicker1" name="RadDatePicker1" type="text" class="rdfd_" value="" /><style type='text/css'>/*Telerik RadCalendar Default skin*/  
 
table.RadCalendar_Default  
{  
    border-collapse:separate;  
    border:0;  
    background:#fff;  
    font:11px arial,tahoma,sans-serif;  
    width:220px;  
}  
 
/*titlebar*/  
 
.RadCalendar_Default .rcTitlebar  
{  
    width:100%;  
    border:1px solid;  
    border-color:#101010 #090909 #171717;  
    padding:0;  
    background:#444 url('/cb_development/WebResource.axd?d=GY5_dY0OqN5Ye8MygpNIEtK9CJJ24Z0xzFKd0JRJCBrVyX7paXxYTcN1q0R1aGLeMm84v2mP1nvsTE4QOEmezOdIyduwgvpXQFsOkbw_gJM1&t=633631346260000000') 0 -500px repeat-x;  
    color:#fff;  
}  
 

I cannot see no such code in your html. How is it possible? I am using Version 2008.3 1125.

I have simply dragged calendar picker from toolbox. My page looks like that:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="x_test.aspx.cs" Inherits="CB.x_test"  %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
 
<head runat="server">  
    <title>Untitled Page</title> 
      
      
<script type="text/javascript">  
     
 
 
</script> 
 
</head> 
<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
        <telerik:RadDatePicker ID="RadDatePicker1" runat="server">  
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"></Calendar> 
 
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> 
        </telerik:RadDatePicker> 
           
 
    </form> 
</body> 
</html> 
 

2) I am trying to share calendar popup between datePicker and dateTimePicker. But I am receiving an client side errors.

Is it possible?

Thank you.

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Feb 2009, 09:23 AM
Hi Tomas,

The observed problem with the CSS skin being rendered in the HTML output is an issue only in Q3 2008 SP1 (2008.3.1125). Please upgrade to SP2 (2008.3.1314).

I am afraid I did not understand what client errors you are talking about. Let us know if you need more information.

Best wishes,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
tomas
Top achievements
Rank 1
answered on 05 Feb 2009, 08:03 PM

Newer installation did solve my problem with stylesheet. But the second problem still exists. This page has javascript errors and nothing is working on the client:

aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="x_test.aspx.cs" Inherits="CB.x_test"  %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
 
<head runat="server">  
    <title>Untitled Page</title> 
      
      
<script type="text/javascript">  
     
 
 
</script> 
 
</head> 
<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
        <asp:PlaceHolder ID="ph" runat="server" ></asp:PlaceHolder> 
 
 
    </form> 
</body> 
</html> 
 


C#

using System;  
using System.Collections;  
using System.Configuration;  
using System.Data;  
using System.Linq;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
using System.Data.SqlClient;  
 
using Telerik.Web.UI;  
 
 
namespace CB  
{  
    public partial class x_test :  System.Web.UI.Page  
      
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            RadDatePicker rdp = new RadDatePicker();  
            RadDateTimePicker rdtp = new RadDateTimePicker();  
            RadCalendar popupCalendar = new RadCalendar();  
            RadTimeView popupView = new RadTimeView();  
            this.ph.Controls.Add(popupCalendar);  
            this.ph.Controls.Add(popupView);  
            rdp.SharedCalendar = popupCalendar;  
            rdtp.SharedCalendar = popupCalendar;  
            rdtp.SharedTimeView = popupView;  
            this.ph.Controls.Add(rdp);  
            this.ph.Controls.Add(rdtp);  
        }  
    }  
}  
 

As you can see, I am trying to share calendar between dateTimePicker and DatePicker. This is not working at all. What is wrong with my code?

Thank you very much.

Tom
0
Accepted
Pavel
Telerik team
answered on 09 Feb 2009, 07:16 AM
Hello Tomas,

Try adding the pickers first and then the Calendar and TimeView controls:

protected void Page_Load(object sender, EventArgs e) 
    { 
        RadDatePicker rdp = new RadDatePicker(); 
        rdp.ID = "rdp"
        RadDateTimePicker rdtp = new RadDateTimePicker(); 
        rdtp.ID = "rdtp"
        RadCalendar popupCalendar = new RadCalendar(); 
        popupCalendar.ID = "popupCalendar"
        RadTimeView popupView = new RadTimeView(); 
        popupView.ID = "popupView"
        rdp.SharedCalendar = popupCalendar; 
        rdtp.SharedCalendar = popupCalendar; 
        rdtp.SharedTimeView = popupView; 
        this.ph.Controls.Add(rdp); 
        this.ph.Controls.Add(rdtp); 
        this.ph.Controls.Add(popupCalendar); 
        this.ph.Controls.Add(popupView); 
    } 

I hope this helps.

Best wishes,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
tomas
Top achievements
Rank 1
Answers by
Dimo
Telerik team
tomas
Top achievements
Rank 1
Pavel
Telerik team
Share this question
or