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

Render don't change after value set with custom format

1 Answer 66 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Mathieu Roy
Top achievements
Rank 1
Mathieu Roy asked on 12 Feb 2010, 07:34 PM

Hi,

I have a problem with the most simplest thing with RadDateTimePicker (2009.3.9.1203). I only want to set date, at form opening, like this :

 

 

 

Me.radDateTimePickerStart.Value = DateTime.Now.AddDays(-7)

 

 

 

Me.radDateTimePickerEnd.Value = DateTime.Now

if I set property of format to System.Windows.Forms.DateTimePickerFormat.Custom, the render is not updating on the form, but if i debug the control, the value is ok. With custom format the problem disappear.

Here is the complete control setup :
Me.radDateTimePickerStart.AutoSize = True

 

 

 

Me.radDateTimePickerStart.Culture = New System.Globalization.CultureInfo("fr-CA")

 

 

 

Me.radDateTimePickerStart.Format = System.Windows.Forms.DateTimePickerFormat.Custom

 

 

 

Me.radDateTimePickerStart.Location = New System.Drawing.Point(782, 531)

 

 

 

Me.radDateTimePickerStart.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0)

 

 

 

Me.radDateTimePickerStart.MinDate = New Date(1900, 1, 1, 0, 0, 0, 0)

 

 

 

Me.radDateTimePickerStart.Name = "radDateTimePickerStart"

 

 

 

 

Me.radDateTimePickerStart.NullDate = New Date(1900, 1, 1, 0, 0, 0, 0)

 

 

 

Me.radDateTimePickerStart.Size = New System.Drawing.Size(150, 22)

 

 

 

Me.radDateTimePickerStart.TabIndex = 5

 

 

 

Me.radDateTimePickerStart.Text = "RadDateTimePicker1"

 

 

 

 

Me.radDateTimePickerStart.Value = New Date(2010, 2, 12, 14, 18, 35, 101)

thx,

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dobry Zranchev
Telerik team
answered on 15 Feb 2010, 02:05 PM
Hello Mathieu Roy,

You should set the property CustomFormat when you set the Format property to Custom. By default it is empty. For example you could show a day as you set CustomFormat to "DD". For other formats please look at:
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

I hope this helps. If you have additional questions feel free to ask.

All the best,
Dobry Zranchev
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.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Mathieu Roy
Top achievements
Rank 1
Answers by
Dobry Zranchev
Telerik team
Share this question
or