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

How to show 11:59:00 PM in RadDateTimePicker

1 Answer 59 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Vincy
Top achievements
Rank 1
Vincy asked on 21 May 2014, 10:42 AM
Hi All,
I have a RadDateTimePicker defined like this:

 <telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server">          
  </telerik:RadDateTimePicker>

and I have used this code in PageLoad function:
 if (!Page.IsPostBack)
            {

                List<DateTime> dateList = new List<DateTime>();

                for (int hour = 0; hour < 24; hour++)
                    dateList.Add(DateTime.UtcNow.Date.AddHours(hour));
                dateList[0] = dateList[0].AddDays(1).AddMinutes(-1);

                RadDateTimePicker1.TimeView.DataList.DataSource = dateList;
                
            
            }

Above code is used to display 11:59:00 PM in the time selection, but my issue is , whenever I select any Time , then 5:30 hours get automatically added to the time.
for eg. If i select 2:00 PM, then 7:30PM get displayed in the RadDateTimePicker.

Please help.

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 26 May 2014, 07:59 AM
Hi Vincy,

I tried replicating the behavior you describe, however I was unable to. I made a short video showing the behavior on my side. Also I am attaching the sample project I used for testing.

Would you give it a try and let me know if I am missing something? Also could you describe what needs to be changed in the sample in order for the issue to be observed? This would allow us to reproduce the problem locally and look for its cause.


Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Calendar
Asked by
Vincy
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or