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

RadDateTimePicker on a RadPageViewPage

8 Answers 137 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Sorin Mecu
Top achievements
Rank 1
Sorin Mecu asked on 11 Nov 2010, 09:34 AM
Repro: 
  1. Create a standard WinForms application
  2. Drag from the toolbox a RadPageView and add 2 RadPageViewPage.
  3. Drag from toolbox a RadDateTimePicker on the form and on the each page.
  4. Set, for each RadDateTimePicker, the Value to 11/11/2010 9:51 AM , the Format to Long and make sure that the CustomFormat is empty
  5. Change the RegionalSettings of the computer to en-US
  6. Run the application and browse the page that is not visible. Notice the RadDateTimePicker aspect on that page: the text is truncated and from Thursday, November 11, 2010 only day, November 11, 2010 is visible.

Do you know a workarround for this bug?

Later edit: I forgot to mention that i use Windows7 Ultimate 64 bit and the Telerik.WinControls.UI.dll version is  2010.2.10.806

8 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 11 Nov 2010, 10:43 PM
Hello Sorin,

Can you please try updating to the latest version Q3 2010 ? Released yesterday.

If this problem persists please let me know.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga

Telerik WinForms MVP
0
Sorin Mecu
Top achievements
Rank 1
answered on 12 Nov 2010, 09:50 AM
Yes the problem persists for the 2010 Q3.
0
Richard Slade
Top achievements
Rank 2
answered on 12 Nov 2010, 01:31 PM
Hello Sorrin,

I have the following code in my form load, a RadPageView with 2 pages, but I haven't been able to reproduce your issue with 2010 Q3.
System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US")
Me.RadDateTimePicker1.Culture = New System.Globalization.CultureInfo("en-US")
Me.RadDateTimePicker2.Culture = New System.Globalization.CultureInfo("en-US")
Me.RadDateTimePicker3.Culture = New System.Globalization.CultureInfo("en-US")
Me.RadDateTimePicker4.Culture = New System.Globalization.CultureInfo("en-US")
Me.RadDateTimePicker1.Value = New DateTime(2010, 11, 11, 9, 51, 0)
Me.RadDateTimePicker2.Value = New DateTime(2010, 11, 11, 9, 51, 0)
Me.RadDateTimePicker3.Value = New DateTime(2010, 11, 11, 9, 51, 0)
Me.RadDateTimePicker4.Value = New DateTime(2010, 11, 11, 9, 51, 0)
Me.RadDateTimePicker1.Format = DateTimePickerFormat.Long
Me.RadDateTimePicker2.Format = DateTimePickerFormat.Long
Me.RadDateTimePicker3.Format = DateTimePickerFormat.Long
Me.RadDateTimePicker4.Format = DateTimePickerFormat.Long
Me.RadDateTimePicker1.CustomFormat = ""
Me.RadDateTimePicker2.CustomFormat = ""
Me.RadDateTimePicker3.CustomFormat = ""
Me.RadDateTimePicker4.CustomFormat = ""

Please can you post a reproducable version, and I can take a look for you.
Thanks
Richard
0
Sorin Mecu
Top achievements
Rank 1
answered on 13 Nov 2010, 08:27 AM
using System;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
 
        public Form1()
        {
            InitializeComponent();
        }
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Windows Form Designer generated code
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.radPageView1 = new Telerik.WinControls.UI.RadPageView();
            this.radPageViewPage1 = new Telerik.WinControls.UI.RadPageViewPage();
            this.radPageViewPage2 = new Telerik.WinControls.UI.RadPageViewPage();
            this.radDateTimePicker1 = new Telerik.WinControls.UI.RadDateTimePicker();
            this.radDateTimePicker2 = new Telerik.WinControls.UI.RadDateTimePicker();
            this.radDateTimePicker3 = new Telerik.WinControls.UI.RadDateTimePicker();
            ((System.ComponentModel.ISupportInitialize)(this.radPageView1)).BeginInit();
            this.radPageView1.SuspendLayout();
            this.radPageViewPage1.SuspendLayout();
            this.radPageViewPage2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker3)).BeginInit();
            this.SuspendLayout();
            //
            // radPageView1
            //
            this.radPageView1.Controls.Add(this.radPageViewPage1);
            this.radPageView1.Controls.Add(this.radPageViewPage2);
            this.radPageView1.Location = new System.Drawing.Point(12, 12);
            this.radPageView1.Name = "radPageView1";
            this.radPageView1.SelectedPage = this.radPageViewPage1;
            this.radPageView1.Size = new System.Drawing.Size(462, 146);
            this.radPageView1.TabIndex = 0;
            this.radPageView1.Text = "radPageView1";
            //
            // radPageViewPage1
            //
            this.radPageViewPage1.Controls.Add(this.radDateTimePicker3);
            this.radPageViewPage1.Location = new System.Drawing.Point(10, 37);
            this.radPageViewPage1.Name = "radPageViewPage1";
            this.radPageViewPage1.Size = new System.Drawing.Size(441, 98);
            this.radPageViewPage1.Text = "radPageViewPage1";
            //
            // radPageViewPage2
            //
            this.radPageViewPage2.Controls.Add(this.radDateTimePicker2);
            this.radPageViewPage2.Location = new System.Drawing.Point(10, 37);
            this.radPageViewPage2.Name = "radPageViewPage2";
            this.radPageViewPage2.Size = new System.Drawing.Size(441, 98);
            this.radPageViewPage2.Text = "radPageViewPage2";
            //
            // radDateTimePicker1
            //
            this.radDateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Long;
            this.radDateTimePicker1.Location = new System.Drawing.Point(32, 186);
            this.radDateTimePicker1.MaxDate = new System.DateTime(9998, 12, 31, 0, 0, 0, 0);
            this.radDateTimePicker1.MinDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker1.Name = "radDateTimePicker1";
            this.radDateTimePicker1.NullDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker1.Size = new System.Drawing.Size(375, 20);
            this.radDateTimePicker1.TabIndex = 1;
            this.radDateTimePicker1.TabStop = false;
            this.radDateTimePicker1.Text = "radDateTimePicker1";
            this.radDateTimePicker1.Value = new System.DateTime(2010, 11, 11, 9, 51, 0, 0);
            //
            // radDateTimePicker2
            //
            this.radDateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Long;
            this.radDateTimePicker2.Location = new System.Drawing.Point(34, 21);
            this.radDateTimePicker2.MaxDate = new System.DateTime(9998, 12, 31, 0, 0, 0, 0);
            this.radDateTimePicker2.MinDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker2.Name = "radDateTimePicker2";
            this.radDateTimePicker2.NullDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker2.Size = new System.Drawing.Size(351, 20);
            this.radDateTimePicker2.TabIndex = 0;
            this.radDateTimePicker2.TabStop = false;
            this.radDateTimePicker2.Text = "radDateTimePicker2";
            this.radDateTimePicker2.Value = new System.DateTime(2010, 11, 11, 9, 51, 0, 0);
            //
            // radDateTimePicker3
            //
            this.radDateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.Long;
            this.radDateTimePicker3.Location = new System.Drawing.Point(21, 27);
            this.radDateTimePicker3.MaxDate = new System.DateTime(9998, 12, 31, 0, 0, 0, 0);
            this.radDateTimePicker3.MinDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker3.Name = "radDateTimePicker3";
            this.radDateTimePicker3.NullDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker3.Size = new System.Drawing.Size(371, 20);
            this.radDateTimePicker3.TabIndex = 0;
            this.radDateTimePicker3.TabStop = false;
            this.radDateTimePicker3.Text = "radDateTimePicker3";
            this.radDateTimePicker3.Value = new System.DateTime(2010, 11, 11, 9, 51, 0, 0);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(486, 262);
            this.Controls.Add(this.radDateTimePicker1);
            this.Controls.Add(this.radPageView1);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.radPageView1)).EndInit();
            this.radPageView1.ResumeLayout(false);
            this.radPageViewPage1.ResumeLayout(false);
            this.radPageViewPage1.PerformLayout();
            this.radPageViewPage2.ResumeLayout(false);
            this.radPageViewPage2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker3)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadPageView radPageView1;
        private Telerik.WinControls.UI.RadPageViewPage radPageViewPage1;
        private Telerik.WinControls.UI.RadDateTimePicker radDateTimePicker3;
        private Telerik.WinControls.UI.RadPageViewPage radPageViewPage2;
        private Telerik.WinControls.UI.RadDateTimePicker radDateTimePicker2;
        private Telerik.WinControls.UI.RadDateTimePicker radDateTimePicker1;
    }
}
0
Richard Slade
Top achievements
Rank 2
answered on 13 Nov 2010, 12:01 PM
Hi Sorin,

At the moment, I can only confirm that I can replicate this. I have noticed that when clicking on the arrow for the calendar, then day then displays correctly. I'll be having a look at a workaround for this bug for you.

Regards,
Richard
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 13 Nov 2010, 12:13 PM
Hi Sorin,

Ok, I have a workaround for you. It seems as though setting the format of the calendar to short, and then back to long solves the issue. Please can you try the code below.

using System;
using System.Windows.Forms;
using Telerik.WinControls.UI;
   
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
   
        public Form1()
        {
            System.Globalization.CultureInfo us = new System.Globalization.CultureInfo("en-US");
            System.Threading.Thread.CurrentThread.CurrentCulture = us;
            InitializeComponent();
  
            // workaround is here. change the format to short and back to long
            this.radDateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            this.radDateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Long;
  
           this.radDateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.Short;
           this.radDateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.Long;
            // end workaround
        }
  
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
   
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
   
        #region Windows Form Designer generated code
   
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.radPageView1 = new Telerik.WinControls.UI.RadPageView();
            this.radPageViewPage1 = new Telerik.WinControls.UI.RadPageViewPage();
            this.radPageViewPage2 = new Telerik.WinControls.UI.RadPageViewPage();
            this.radDateTimePicker1 = new Telerik.WinControls.UI.RadDateTimePicker();
            this.radDateTimePicker2 = new Telerik.WinControls.UI.RadDateTimePicker();
            this.radDateTimePicker3 = new Telerik.WinControls.UI.RadDateTimePicker();
            ((System.ComponentModel.ISupportInitialize)(this.radPageView1)).BeginInit();
            this.radPageView1.SuspendLayout();
            this.radPageViewPage1.SuspendLayout();
            this.radPageViewPage2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker3)).BeginInit();
            this.SuspendLayout();
            //
            // radPageView1
            //
            this.radPageView1.Controls.Add(this.radPageViewPage1);
            this.radPageView1.Controls.Add(this.radPageViewPage2);
            this.radPageView1.Location = new System.Drawing.Point(12, 12);
            this.radPageView1.Name = "radPageView1";
            this.radPageView1.SelectedPage = this.radPageViewPage1;
            this.radPageView1.Size = new System.Drawing.Size(462, 146);
            this.radPageView1.TabIndex = 0;
            this.radPageView1.Text = "radPageView1";
            //
            // radPageViewPage1
            //
            this.radPageViewPage1.Controls.Add(this.radDateTimePicker3);
            this.radPageViewPage1.Location = new System.Drawing.Point(10, 37);
            this.radPageViewPage1.Name = "radPageViewPage1";
            this.radPageViewPage1.Size = new System.Drawing.Size(441, 98);
            this.radPageViewPage1.Text = "radPageViewPage1";
            //
            // radPageViewPage2
            //
            this.radPageViewPage2.Controls.Add(this.radDateTimePicker2);
            this.radPageViewPage2.Location = new System.Drawing.Point(10, 37);
            this.radPageViewPage2.Name = "radPageViewPage2";
            this.radPageViewPage2.Size = new System.Drawing.Size(441, 98);
            this.radPageViewPage2.Text = "radPageViewPage2";
            //
            // radDateTimePicker1
            //
            this.radDateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Long;
            this.radDateTimePicker1.Location = new System.Drawing.Point(32, 186);
            this.radDateTimePicker1.MaxDate = new System.DateTime(9998, 12, 31, 0, 0, 0, 0);
            this.radDateTimePicker1.MinDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker1.Name = "radDateTimePicker1";
            this.radDateTimePicker1.NullDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker1.Size = new System.Drawing.Size(375, 20);
            this.radDateTimePicker1.TabIndex = 1;
            this.radDateTimePicker1.TabStop = false;
            this.radDateTimePicker1.Text = "radDateTimePicker1";
            this.radDateTimePicker1.Value = new System.DateTime(2010, 11, 11, 9, 51, 0, 0);
            //
            // radDateTimePicker2
            //
            this.radDateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Long;
            this.radDateTimePicker2.Location = new System.Drawing.Point(34, 21);
            this.radDateTimePicker2.MaxDate = new System.DateTime(9998, 12, 31, 0, 0, 0, 0);
            this.radDateTimePicker2.MinDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker2.Name = "radDateTimePicker2";
            this.radDateTimePicker2.NullDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker2.Size = new System.Drawing.Size(351, 20);
            this.radDateTimePicker2.TabIndex = 0;
            this.radDateTimePicker2.TabStop = false;
            this.radDateTimePicker2.Text = "radDateTimePicker2";
            this.radDateTimePicker2.Value = new System.DateTime(2010, 11, 11, 9, 51, 0, 0);
            //
            // radDateTimePicker3
            //
            this.radDateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.Long;
            this.radDateTimePicker3.Location = new System.Drawing.Point(21, 27);
            this.radDateTimePicker3.MaxDate = new System.DateTime(9998, 12, 31, 0, 0, 0, 0);
            this.radDateTimePicker3.MinDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker3.Name = "radDateTimePicker3";
            this.radDateTimePicker3.NullDate = new System.DateTime(1753, 1, 1, 0, 0, 0, 0);
            this.radDateTimePicker3.Size = new System.Drawing.Size(371, 20);
            this.radDateTimePicker3.TabIndex = 0;
            this.radDateTimePicker3.TabStop = false;
            this.radDateTimePicker3.Text = "radDateTimePicker3";
            this.radDateTimePicker3.Value = new System.DateTime(2010, 11, 11, 9, 51, 0, 0);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(486, 262);
            this.Controls.Add(this.radDateTimePicker1);
            this.Controls.Add(this.radPageView1);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.radPageView1)).EndInit();
            this.radPageView1.ResumeLayout(false);
            this.radPageViewPage1.ResumeLayout(false);
            this.radPageViewPage1.PerformLayout();
            this.radPageViewPage2.ResumeLayout(false);
            this.radPageViewPage2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radDateTimePicker3)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
   
        }
   
        #endregion
   
        private Telerik.WinControls.UI.RadPageView radPageView1;
        private Telerik.WinControls.UI.RadPageViewPage radPageViewPage1;
        private Telerik.WinControls.UI.RadDateTimePicker radDateTimePicker3;
        private Telerik.WinControls.UI.RadPageViewPage radPageViewPage2;
        private Telerik.WinControls.UI.RadDateTimePicker radDateTimePicker2;
        private Telerik.WinControls.UI.RadDateTimePicker radDateTimePicker1;
    }
}


Hope that this helps, but please let me know if there's anything else.

Richard
0
Sorin Mecu
Top achievements
Rank 1
answered on 13 Nov 2010, 05:48 PM
It works. Thank you very much!

My real scenario is using a custom format, i tried changing the Format property back and forth, but i didn't cleared the CustomFormat property so i missed this fix.

Sorin
0
Richard Slade
Top achievements
Rank 2
answered on 13 Nov 2010, 06:33 PM
Hi,

No problem. Glad it's sorted and that I was able to help.

Richard
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Sorin Mecu
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Sorin Mecu
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
Share this question
or